Commit 4b017e5
committed
efi: ssdt: Don't free memory if ACPI table was loaded successfully
Amadeusz reports KASAN use-after-free errors introduced by commit
3881ee0 ("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: 3881ee0 ("efi: avoid efivars layer when loading SSDTs from variables")
Reported-by: Amadeusz Sławiński <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>1 parent f57fb37 commit 4b017e5
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| |||
0 commit comments