Re: [PATCH] usb: gadget: f_ncm: Fix use-after-free in ncm_wrap_ntb()
From: Boyan Liu
Date: Fri Nov 06 2026 - 02:10:44 EST
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?
Thanks,
Boyan