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: <CANn89iJ=Nom+4gUL2yROvobd0VQ=rjW5nVdDHkADxPFMjkn0OQ@mail.gmail.com>
Date: Tue, 30 Apr 2024 12:50:58 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Davide Caratti <dcaratti@...hat.com>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>, lkft-triage@...ts.linaro.org, 
	regressions@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com, 
	jiri@...nulli.us, cpaasch@...le.com, pabeni@...hat.com, xmu@...hat.com, 
	maxim@...valent.com, anders.roxell@...aro.org, dan.carpenter@...aro.org, 
	arnd@...db.de, Linux Kernel Functional Testing <lkft@...aro.org>
Subject: Re: selftests: tc-testing: tdc.sh: WARNING: at kernel/locking/lockdep.c:1226
 lockdep_register_key

On Tue, Apr 30, 2024 at 12:30 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Apr 30, 2024 at 12:17 PM Davide Caratti <dcaratti@...hat.com> wrote:
> >
> > hello,
> >
> > On Tue, Apr 30, 2024 at 12:17 AM Naresh Kamboju
> > <naresh.kamboju@...aro.org> wrote:
> > >
> > > While running selftests: tc-testing: tdc.sh the following kernel warnings,
> > > kernel Bug, kernel oops and kernel panic noticed with Linux next-20240429
> > > tag kernel as per the available data.
> > >
> > > This build config is from kselftest merge config[1].
> > >
> > > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> > >
> > > selftests: tc-testing: tdc.sh log and crash log
> >
> > the problem is created by [1]. I think that at least we need to guard
> > against failures to allocate sch->cpu_bstats and sch->cpu_qstats,
> > otherwise the dynamic key is registered but never unregistered (though
> > the key is freed  in the error path of of qdisc_alloc() ). But there
> > might be also something else; however, I can reproduce some similar
> > splat, will follow-up on the list.
> >
> > sorry for the noise,
> > --
> > davide
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=af0cb3fa3f9ed258d14abab0152e28a0f9593084
> >
>
> I just had  5 or 6 syzbot reports about this issue.
>
> I tested the following fix.
>
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 31dfd6c7405b01e22fe1b8c80944e2bed7d30ddc..d3f6006b563ccd8827b7af362ce9dceaa78f8841
> 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -982,6 +982,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
>
>         return sch;
>  errout1:
> +       lockdep_unregister_key(&sch->root_lock_key);
>         kfree(sch);
>  errout:
>         return ERR_PTR(err);

Davide, I will let you send a formal fix. Let me know if you want me
to release a syzbot report.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ