Re: [PATCH 0/2] pstore: fix two ramoops error-path bugs

From: Kees Cook

Date: Mon Sep 21 2026 - 17:38:27 EST


On Mon, 21 Sep 2026 22:23:14 +0200, Andrea Parri wrote:
> Two bugs in the ramoops error paths, found by review and confirmed with
> test-only reproducers against an unfixed kernel:
>
> - ramoops_init_prz() stores persistent_ram_new()'s ERR_PTR in the zone
> pointer and returns without clearing it; the probe error path then
> passes it to persistent_ram_free(), which dereferences it and oopses.
>
> [...]

Applied to for-next/pstore, thanks!

[1/2] pstore: don't leave an ERR_PTR in the ramoops zone pointer
https://git.kernel.org/kees/c/70fec428c845
[2/2] pstore: reject persistent RAM zones too small for the buffer header
https://git.kernel.org/kees/c/1b30df8662ac

Take care,

--
Kees Cook