Rik van Riel 34cf99c250 x86/mm, kexec, ima: 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 bug.

Fixes: fee3ff99bc67 ("powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c")
Suggested-by: Mike Rappoport <rppt@kernel.org>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230817135558.67274c83@imladris.surriel.com
2023-09-18 09:24:15 +02:00
..
2023-09-05 11:01:47 -07:00
2023-09-04 15:38:24 -07:00
2023-09-07 13:52:20 -07:00
2023-09-01 08:02:45 -07:00
2023-08-31 12:20:12 -07:00
2023-09-05 11:01:47 -07:00
2023-09-08 12:16:52 -07:00
2023-09-05 12:37:28 -07:00
2023-09-05 10:15:22 -07:00
2023-09-07 13:52:20 -07:00
2023-08-31 12:20:12 -07:00
2023-09-05 10:09:31 -07:00
2023-09-05 12:37:28 -07:00
2023-09-09 14:46:57 -07:00
2023-09-05 12:37:28 -07:00
2023-09-07 10:30:17 -07:00
2023-08-31 12:20:12 -07:00