Re: [linus:master] [sysctl] 8d75c338f0: BUG:KASAN:slab-use-after-free_in_touch_wq_lockdep_map
From: Oleg Nesterov
Date: Tue Oct 20 2026 - 07:13:34 EST
On 10/20, Joel Granados wrote:
>
> On Mon, Oct 19, 2026 at 12:52:58PM -0700, Allison Henderson wrote:
> >
> > CONFIG_SYSCTL=n. A simpler fix might be to just handle the NULL at the
> > three call sites, e.g.:
> >
> > rds_sysctl_reg_table =
> > register_net_sysctl(&init_net, "net/rds", rds_sysctl_rds_table);
> > if (!rds_sysctl_reg_table && IS_ENABLED(CONFIG_SYSCTL))
> > return -ENOMEM;
> >
>
> Remember to NULL check rds_sysctl_reg_table in rds_sysctl_exit(). You
> might hit another UAF on exit if you don't.
Why? unregister_sysctl_table(header) does nothing if header == NULL.
Oleg.