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] [day] [month] [year] [list]
Date:   Thu, 2 Mar 2023 11:20:37 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Wolfram Sang <wsa@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Lee Jones <lee@...nel.org>,
        linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] driver core: bus: Handle early calls to bus_to_subsys()

On Tue, Feb 28, 2023 at 11:57:02AM +0100, Wolfram Sang wrote:
> On Tue, Feb 21, 2023 at 01:53:51PM +0100, Geert Uytterhoeven wrote:
> > When calling soc_device_match() from early_initcall(), bus_kset is still
> > NULL, causing a crash:
> > 
> >     Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028
> >     ...
> >     Call trace:
> >      __lock_acquire+0x530/0x20f0
> >      lock_acquire.part.0+0xc8/0x210
> >      lock_acquire+0x64/0x80
> >      _raw_spin_lock+0x4c/0x60
> >      bus_to_subsys+0x24/0xac
> >      bus_for_each_dev+0x30/0xcc
> >      soc_device_match+0x4c/0xe0
> >      r8a7795_sysc_init+0x18/0x60
> >      rcar_sysc_pd_init+0xb0/0x33c
> >      do_one_initcall+0x128/0x2bc
> > 
> > Before, bus_for_each_dev() handled this gracefully by checking that
> > the back-pointer to the private structure was valid.
> > 
> > Fix this by adding a NULL check for bus_kset to bus_to_subsys().
> > 
> > Fixes: 83b9148df2c95e23 ("driver core: bus: bus iterator cleanups")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> 
> Current top-of-head doesn't boot my Salvator-XS board, this patch fixed
> it.
> 
> Tested-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> 

Great, now sent to Linus.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ