Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] nfp: fix double-free and UAF in CCM mailbox error paths
@ 2026-12-04 18:20 Elkin Cruz
  2026-12-04 18:20 ` [PATCH net v2 1/2] nfp: fix double-free on timeout in __nfp_ccm_mbox_communicate() Elkin Cruz
  2026-12-04 18:20 ` [PATCH net v2 2/2] nfp: fix use-after-free in nfp_ccm_mbox_skb_return() Elkin Cruz
  0 siblings, 2 replies; 3+ messages in thread
From: Elkin Cruz @ 2026-12-04 18:20 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Nathan Chancellor
  Cc: Simon Horman, oss-drivers, netdev, Nick Desaulniers,
	Bill Wendling, Justin Stitt, llvm, linux-kernel, irogers,
	Elkin Cruz

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@google.com

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-04 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 18:20 [PATCH net v2 0/2] nfp: fix double-free and UAF in CCM mailbox error paths Elkin Cruz
2026-12-04 18:20 ` [PATCH net v2 1/2] nfp: fix double-free on timeout in __nfp_ccm_mbox_communicate() Elkin Cruz
2026-12-04 18:20 ` [PATCH net v2 2/2] nfp: fix use-after-free in nfp_ccm_mbox_skb_return() Elkin Cruz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox