]> www.infradead.org Git - users/willy/linux.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)
commit9ceee7d0841a8f7d7644021ba7d4cc1fbc7966e3
tree91df4aa2a0987806b89ba4b033591dec45327bbb
parent483028edacab374060d93955382b4865a9e07cba
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: 18df7577adae6 ("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