Re: [PATCH] mm: debug_page_alloc: fix NULL buf in debug_guardpage_minorder_setup
"Zi Yan" <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On Wed Aug 5, 2026 at 8:45 PM EDT, Ye Liu wrote: > From: Ye Liu <[email protected]> > > If the kernel command line includes "debug_guardpage_minorder" without > an equals sign (i.e., no value is provided), the early parameter > parser passes a NULL buf pointer to the setup function. > > kstrtouint() does not perform a NULL check on its input and calls > directly into kstrtoull() which dereferences s[0] unconditionally, > leading to a NULL pointer dereference and early boot crash. > > Additionally, the error path's pr_err("%s", buf) would also crash with > a NULL format argument. > > Signed-off-by: Ye Liu <[email protected]> > --- > mm/debug_page_alloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > LGTM. Acked-by: Zi Yan <[email protected]> -- Best Regards, Yan, Zi