Re: [PATCH 0/2] driver core: platform: fix sw node use-after-free on device release
From: Johan Hovold
Date: Wed Nov 04 2026 - 04:14:48 EST
On Tue, Nov 03, 2026 at 03:38:16PM +0100, Johan Hovold wrote:
> 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.
Except when the software node is indeed primary... Then the UAF issue is
real.
I'll send a v2.
Johan