diff options
author | Ard Biesheuvel <[email protected]> | 2022-10-14 12:25:52 +0200 |
---|---|---|
committer | Ard Biesheuvel <[email protected]> | 2022-10-21 11:09:40 +0200 |
commit | 4b017e59f01097f19b938f6dc4dc2c4720701610 (patch) | |
tree | 403cdf74e256b38e383983ad6e8b99675c3076de /lib/memory-notifier-error-inject.c | |
parent | f57fb375a203e28bf7c08ca01d5ee72028b391d9 (diff) |
efi: ssdt: Don't free memory if ACPI table was loaded successfully
Amadeusz reports KASAN use-after-free errors introduced by commit
3881ee0b1edc ("efi: avoid efivars layer when loading SSDTs from
variables"). The problem appears to be that the memory that holds the
new ACPI table is now freed unconditionally, instead of only when the
ACPI core reported a failure to load the table.
So let's fix this, by omitting the kfree() on success.
Cc: <[email protected]> # v6.0
Link: https://lore.kernel.org/all/[email protected]/
Fixes: 3881ee0b1edc ("efi: avoid efivars layer when loading SSDTs from variables")
Reported-by: Amadeusz Sławiński <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions