Re: [PATCH] pstore: fix NULL pointer dereference in console writes

From: Kees Cook
Date: Tue Oct 30 2012 - 12:45:10 EST


On Tue, Oct 30, 2012 at 7:40 AM, Colin King <colin.king@xxxxxxxxxxxxx> wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Passing a NULL id causes a NULL pointer deference in writers
> such as erst_writer and efi_pstore_write because they expect
> to update this id. Pass a dummy id instead.
>
> This avoids a cascade of oopses caused when the initial
> pstore_console_write passes a null which in turn causes
> writes to the console causing further oopses in subsequent
> pstore_console_write calls.
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Good catch; thanks!

Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>

-Kees

--
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/