Re: [PATCH 0/2] driver core: platform: fix sw node use-after-free on device release

From: Johan Hovold

Date: Tue Nov 03 2026 - 10:06:38 EST


On Mon, Nov 02, 2026 at 12:14:18PM +0100, Johan Hovold wrote:
> Sashiko noted a new use-after-free issue when freeing platform device
> which has a software node as its primary fw node.
>
> Turns out that can cause trouble also when drivers or subsystems remove
> software nodes themselves.

Hmm. The subtleties of the software node implementation got the better
of both the LLM and its operator it seems.

Clearing the secondary node when the device has only a software node
does indeed clear the fwnode pointer so there was never any UAF here.

I've dropped the first patch from the driver core testing branch.

Sorry for the noise.

Johan