lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYsZ6ZNxyhkVq=7UV8W3BxOpD7w-_5==ZERN8=my0ij=Tg@mail.gmail.com>
Date: Wed, 1 May 2024 16:08:12 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: Ido Schimmel <idosch@...sch.org>
Cc: Davide Caratti <dcaratti@...hat.com>, Jamal Hadi Salim <jhs@...atatu.com>, 
	Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net/sched: unregister lockdep keys in
 qdisc_create/qdisc_alloc error path

On Wed, 1 May 2024 at 15:56, Ido Schimmel <idosch@...sch.org> wrote:
>
> On Tue, Apr 30, 2024 at 07:11:13PM +0200, Davide Caratti wrote:
> > Naresh and Eric report several errors (corrupted elements in the dynamic
> > key hash list), when running tdc.py or syzbot. The error path of
> > qdisc_alloc() and qdisc_create() frees the qdisc memory, but it forgets
> > to unregister the lockdep key, thus causing use-after-free like the
> > following one:
>
> [...]
>
> > Fix this ensuring that lockdep_unregister_key() is called before the
> > qdisc struct is freed, also in the error path of qdisc_create() and
> > qdisc_alloc().
> >
> > Fixes: af0cb3fa3f9e ("net/sched: fix false lockdep warning on qdisc root lock")
> > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> > Closes: https://lore.kernel.org/netdev/20240429221706.1492418-1-naresh.kamboju@linaro.org/
> > CC: Naresh Kamboju <naresh.kamboju@...aro.org>
> > CC: Eric Dumazet <edumazet@...gle.com>
> > Signed-off-by: Davide Caratti <dcaratti@...hat.com>
>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>

Tested-by: Naresh Kamboju <naresh.kamboju@...aro.org>

I have applied this patch and tested.

>
> We've also hit the issue on two of our machines running debug kernels. I
> started a run with the fix on both and will report tomorrow morning (not
> saying you should wait).

- Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ