From: xuanqiang.luo@linux.dev
To: netdev@vger.kernel.org
Cc: Xuanqiang Luo <luoxuanqiang@kylinos.cn>,
Rasesh Mody <rmody@marvell.com>,
Sudarsana Kalluru <skalluru@marvell.com>,
GR-Linux-NIC-Dev@marvell.com, Fan Gong <gongfan1@huawei.com>,
Xin Guo <guoxin09@huawei.com>, Gur Stavi <gur.stavi@huawei.com>,
Jijie Shao <shaojijie@huawei.com>,
Jian Shen <shenjian15@huawei.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Ivan Vecera <ivecera@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net v1 0/3] net: fix stale TX skb pointers on DMA map failure
Date: Fri, 10 Jul 2026 17:05:21 +0800 [thread overview]
Message-ID: <20260710090527.58354-1-xuanqiang.luo@linux.dev> (raw)
From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
While I was backporting commit 1a303baa715e6 ("ice: fix double-free of
tx_buf skb"), an AI-assisted scan identified several suspected TX error
paths. I reviewed the results and found this issue in the three drivers
fixed here.
The drivers differ, but the bug is the same. On a DMA mapping failure, the
TX path frees an skb while its ring entry still points to it. A later
transmission normally overwrites the entry. If the interface is stopped
first, teardown can instead access or free the skb again.
I do not have these adapters, so I have not tested the drivers on hardware.
I checked the error and teardown paths by inspection. Still, these small
fixes seem worth posting for review. They are independent, but are sent as
one series because they address the same issue.
Xuanqiang Luo (3):
bna: fix use-after-free on DMA mapping failure
hinic3: fix use-after-free on DMA mapping failure
net: hibmcge: fix double-free of tx skb on DMA mapping failure
drivers/net/ethernet/brocade/bna/bnad.c | 2 +-
drivers/net/ethernet/hisilicon/hibmcge/hbg_txrx.c | 1 +
drivers/net/ethernet/huawei/hinic3/hinic3_tx.c | 5 +++--
3 files changed, 5 insertions(+), 3 deletions(-)
--
2.43.0
next reply other threads:[~2026-07-10 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 9:05 xuanqiang.luo [this message]
2026-07-10 9:05 ` [PATCH net v1 1/3] bna: fix use-after-free on DMA mapping failure xuanqiang.luo
2026-07-10 9:05 ` [PATCH net v1 2/3] hinic3: " xuanqiang.luo
2026-07-10 9:05 ` [PATCH net v1 3/3] net: hibmcge: fix double-free of tx skb " xuanqiang.luo
2026-07-10 10:15 ` Jijie Shao
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=20260710090527.58354-1-xuanqiang.luo@linux.dev \
--to=xuanqiang.luo@linux.dev \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gongfan1@huawei.com \
--cc=guoxin09@huawei.com \
--cc=gur.stavi@huawei.com \
--cc=ivecera@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luoxuanqiang@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmody@marvell.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
--cc=skalluru@marvell.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