]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: Fix memory corruption on 32bit systems
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 26 Jul 2023 06:54:52 +0000 (09:54 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 3 Aug 2023 07:21:02 +0000 (09:21 +0200)
commitba49d76636b9b2c3d0146aafb2e2bba7b1009ab7
tree86bbb11531e14a22229c2e135460f685a0f4b2f8
parent2e43cd099e6ebdf1b13925d86ad625be4749f823
efi_loader: Fix memory corruption on 32bit systems

It's pretty unlikely that anyone is going to be using EFI authentication
on a 32bit system.  However, if you did, the efi_prepare_aligned_image()
function would write 8 bytes of data to the &efi_size variable and it
can only hold 4 bytes so that corrupts memory.

Fixes: 1ecb96048d42 ("efi_loader: add PE/COFF image measurement")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_image_loader.c