[PATCH net v2 0/2] nfp: fix double-free and UAF in CCM mailbox error paths
From: Elkin Cruz
Date: Fri Dec 04 2026 - 13:21:36 EST
This series fixes two skb lifetime bugs in the nfp CCM mailbox error
paths (both introduced in d3e4dfe060cc):
1. A double-free on timeout in __nfp_ccm_mbox_communicate() when an
in-progress skb completes with a non-zero cb->err, already freed by
nfp_ccm_mbox_skb_return().
2. A use-after-free in nfp_ccm_mbox_skb_return() where cb->err is read
after dev_kfree_skb_any(skb).
Changes in v2:
- Add patch 1/2 fixing the pre-existing double-free, flagged by netdev's
Sashiko.
- Patch 2/2 is unchanged from v1.
v1: https://lore.kernel.org/r/20261125221658.1420387-1-elkin@xxxxxxxxxx
Both findings were triaged/fixed and commit descriptions were drafted
with the help of AI, then verified by code inspection and compile-tested
(W=1) against linux-next (not reproduced and not runtime-tested on
hardware).
Thanks,
Elkin
Elkin Cruz (2):
nfp: fix double-free on timeout in __nfp_ccm_mbox_communicate()
nfp: fix use-after-free in nfp_ccm_mbox_skb_return()
drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--
2.56.1.987.g2ec0ab4260-goog