]> git.baikalelectronics.ru Git - kernel.git/commit
firmware/efi: Fix a use after bug in efi_mem_reserve_persistent
authorLv Yunlong <lyl2019@mail.ustc.edu.cn>
Wed, 10 Mar 2021 08:31:27 +0000 (00:31 -0800)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 19 Mar 2021 06:44:27 +0000 (07:44 +0100)
commit59f0b821bef7f187b348f147f99786a5dbfa80e3
tree91df4aa2a0987806b89ba4b033591dec45327bbb
parent5cbb32c1c262fec878632a18ade04c901d55c500
firmware/efi: Fix a use after bug in efi_mem_reserve_persistent

In the for loop in efi_mem_reserve_persistent(), prsv = rsv->next
use the unmapped rsv. Use the unmapped pages will cause segment
fault.

Fixes: b7fce60a1ef24 ("efi/memreserve: deal with memreserve entries in unmapped memory")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/efi.c