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]
Message-ID: <2025111720-sensitize-schnapps-3189@gregkh>
Date: Mon, 17 Nov 2025 07:37:51 -0500
From: Greg KH <gregkh@...uxfoundation.org>
To: Zhengqiao Xia <xiazhengqiao@...qin.corp-partner.google.com>
Cc: rafael@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] device_core: check null pointer

On Mon, Nov 17, 2025 at 10:55:05AM +0800, Zhengqiao Xia wrote:
> Hi Greg,
> 
> Based on my analysis,

Please do not top-post :(

> 
> usb_new_device ->  device_add -> device_private_init
>                                                     ->
> bus_probe_device -> usb_generic_driver_probe  ->
> usb_set_configuration  -> "add each interface"  ->
> device_add(&intf->dev);
> 
> 
>                                     --> if of_node status is disabled
> -> of_device_is_available is false -> not running  device_add ->

Why is of_node related to USB interfaces?

> interface dev->p is null
> usbdev_ioctl -> proc_ioctl -> device_attach -> __device_attach ->
> device_attach ->  if (dev->p->dead)
> 
> Since dev->p has not been created at this time, dev->p is NULL,  So I
> think we should add a check here.
> 
> Here is my current analysis, but there may be some misunderstandings
> or mistakes in it. Could you please help clarify my confusion?

As this code is very old, USB was one of the first subsystems to get
driver core support decades ago, what has changed recently to require
this check?  Have you seen crashes here?  If so, what is the traceback
for them and with what hardware/drivers?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ