Re: [PATCH] usb: gadget: f_ncm: Fix use-after-free in ncm_wrap_ntb()
From: Greg Kroah-Hartman
Date: Fri Nov 20 2026 - 07:42:47 EST
On Fri, Nov 06, 2026 at 03:09:14PM +0800, Boyan Liu wrote:
> Hi Greg,
>
> I wanted to follow up on this fix. The use-after-free addressed by v1
> is independent of the two pre-existing issues raised by Sashiko.
>
> For the skb2 leak in the same err: path, would you prefer that I fold
>
> if (skb2)
> dev_kfree_skb_any(skb2);
>
> into a v2 of this patch, or keep it as a separate follow-up? My plan
> for the independent ncm->netdev NULL-dereference race is to handle it
> separately.
>
> Is the use-after-free fix otherwise acceptable, or are any other
> changes needed?
I see no context here at all.