From: Elkin Cruz <elkin@google.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Nathan Chancellor <nathan@kernel.org>
Cc: Simon Horman <horms@kernel.org>,
oss-drivers@corigine.com, netdev@vger.kernel.org,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
llvm@lists.linux.dev, linux-kernel@vger.kernel.org,
irogers@google.com, Elkin Cruz <elkin@google.com>
Subject: [PATCH net v2 0/2] nfp: fix double-free and UAF in CCM mailbox error paths
Date: Fri, 4 Dec 2026 18:20:33 +0000 [thread overview]
Message-ID: <20261204182035.364657-1-elkin@google.com> (raw)
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
next reply other threads:[~2026-12-04 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 18:20 Elkin Cruz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204182035.364657-1-elkin@google.com \
--to=elkin@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=irogers@google.com \
--cc=justinstitt@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox