Netdev List
 help / color / mirror / Atom feed
* [PATCH net v1 0/3] net: fix stale TX skb pointers on DMA map failure
@ 2026-07-10  9:05 xuanqiang.luo
  2026-07-10  9:05 ` [PATCH net v1 1/3] bna: fix use-after-free on DMA mapping failure xuanqiang.luo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: xuanqiang.luo @ 2026-07-10  9:05 UTC (permalink / raw)
  To: netdev
  Cc: Xuanqiang Luo, Rasesh Mody, Sudarsana Kalluru, GR-Linux-NIC-Dev,
	Fan Gong, Xin Guo, Gur Stavi, Jijie Shao, Jian Shen, Andrew Lunn,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Ivan Vecera, linux-kernel

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

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

end of thread, other threads:[~2026-07-10 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  9:05 [PATCH net v1 0/3] net: fix stale TX skb pointers on DMA map failure xuanqiang.luo
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

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