Re: [PATCH 1/2] vsprintf: Prevent crash when dereferencing invalid pointers for %pD

From: Sergey Senozhatsky
Date: Thu Aug 15 2019 - 03:52:10 EST


On (08/09/19 09:24), Jia He wrote:
> Commit 3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid
> pointers") prevents most crash except for %pD.
> There is an additional pointer dereferencing before dentry_name.
>
> At least, vma->file can be NULL and be passed to printk %pD in
> print_bad_pte, which can cause crash.
>
> This patch fixes it with introducing a new file_dentry_name.
>
> Signed-off-by: Jia He <justin.he@xxxxxxx>

The series looks OK to me.

FWIW,
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>

-ss