Commit f0362a2
mm,ima,kexec,of: use memblock_free_late from ima_free_kexec_buffer
The code calling ima_free_kexec_buffer runs long after the memblock
allocator has already been torn down, potentially resulting in a use
after free in memblock_isolate_range.
With KASAN or KFENCE, this use after free will result in a BUG
from the idle task, and a subsequent kernel panic.
Switch ima_free_kexec_buffer over to memblock_free_late to avoid
that issue.
Fixes: fee3ff9 ("powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c")
Cc: [email protected]
Signed-off-by: Rik van Riel <[email protected]>
Suggested-by: Mike Rappoport <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Herring <[email protected]>1 parent ffc59c6 commit f0362a2
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
0 commit comments