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: <b0dd0247-90f6-4769-a1f3-3b3499561b88@lunn.ch>
Date: Thu, 8 Jun 2023 21:13:03 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Christian Marangi <ansuelsmth@...il.com>,
	Vladimir Oltean <olteanv@...il.com>, Pavel Machek <pavel@....cz>,
	Lee Jones <lee@...nel.org>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>
Subject: Re: NPD in phy_led_set_brightness+0x3c

On Thu, Jun 08, 2023 at 10:33:30AM -0700, Florian Fainelli wrote:
> On 6/7/23 18:30, Andrew Lunn wrote:
> > > (gdb) print /x (int)&((struct phy_driver *)0)->led_brightness_set
> > > $1 = 0x1f0
> > > 
> > > so this would indeed look like an use-after-free here. If you tested with a
> > > PHYLINK enabled driver you might have no seen due to
> > > phylink_disconnect_phy() being called with RTNL held?
> > 
> > Yes, i've been testing with mvneta, which is phylink.
> 
> Humm, this is really puzzling because we have the below call trace as to
> where we call schedule_work() which is in led_set_brightness_nopm() however
> we have led_classdev_unregister() call flush_work() to ensure the workqueue
> completed. Is there something else in that call stack that prevents the
> system workqueue from running?

Has phy_remove() already been called? Last thing it does is:

phydev->drv = NULL;

This is one of the differences between my system and yours. With
mvneta, the mdio bus driver is an independent device. You have a
combined MAC and MDIO bus driver.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ