From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 0/4] net/axgbe: fix resource leaks and OOB access
Date: Fri, 8 May 2026 12:10:48 -0700 [thread overview]
Message-ID: <20260508191109.734377-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20260218164324.915065-1-stephen@networkplumber.org>
Code review of the axgbe PMD identified several correctness bugs,
primarily around resource management on error paths in device
initialization and an out-of-bounds descriptor ring access.
Patch 1 fixes multiple resource leak paths in eth_axgbe_dev_init():
- mac_addrs leaked when hash_mac_addrs allocation fails
- hash_mac_addrs leaked when phy_init() fails
- rte_intr_callback_register() return value unchecked
- DMA reset failure via hw_if.exit() logged but not propagated
Patch 2 fixes wrapper_rx_desc_init() which only releases the
current queue on mbuf allocation failure, leaking all mbufs
from previously initialized queues.
Patch 3 adds pthread_mutex_destroy() calls in axgbe_dev_close()
for the four mutexes created during init.
Patch 4 fixes an out-of-bounds read in both Rx and Tx descriptor
status functions where desc[idx + offset] can exceed the ring
size. The offset is now folded into the index before masking.
v2:
- Patch 2: use rte_pktmbuf_alloc_bulk() instead of per-descriptor
allocation.
- Add Fixes: tags to all patches.
Stephen Hemminger (4):
net/axgbe: fix resource leaks in device init error paths
net/axgbe: fix Rx queue leak on descriptor init failure
net/axgbe: destroy mutexes on device close
net/axgbe: fix descriptor status out-of-bounds access
drivers/net/axgbe/axgbe_dev.c | 27 ++++++++++++---------------
drivers/net/axgbe/axgbe_ethdev.c | 26 ++++++++++++++++++++++++--
drivers/net/axgbe/axgbe_rxtx.c | 8 ++++----
3 files changed, 40 insertions(+), 21 deletions(-)
--
2.53.0
next prev parent reply other threads:[~2026-05-08 19:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 16:40 [PATCH 0/4] net/axgbe: fix resource leaks and OOB access Stephen Hemminger
2026-02-18 16:40 ` [PATCH 1/4] net/axgbe: fix resource leaks in device init error paths Stephen Hemminger
2026-02-18 16:41 ` [PATCH 2/4] net/axgbe: fix Rx queue leak on descriptor init failure Stephen Hemminger
2026-04-05 16:11 ` Stephen Hemminger
2026-02-18 16:41 ` [PATCH 3/4] net/axgbe: destroy mutexes on device close Stephen Hemminger
2026-02-18 16:41 ` [PATCH 4/4] net/axgbe: fix descriptor status out-of-bounds access Stephen Hemminger
2026-02-20 17:50 ` [PATCH 0/4] net/axgbe: fix resource leaks and OOB access Stephen Hemminger
2026-02-25 16:52 ` Stephen Hemminger
2026-02-26 12:43 ` Sebastian, Selwin
2026-03-06 18:55 ` Stephen Hemminger
2026-03-08 16:53 ` Ande, Venkat Kumar
2026-03-11 10:53 ` Sebastian, Selwin
2026-05-08 19:10 ` Stephen Hemminger [this message]
2026-05-08 19:10 ` [PATCH v2 1/4] net/axgbe: fix resource leaks in device init error paths Stephen Hemminger
2026-05-08 19:10 ` [PATCH v2 2/4] net/axgbe: fix Rx queue leak on descriptor init failure Stephen Hemminger
2026-05-08 19:10 ` [PATCH v2 3/4] net/axgbe: destroy mutexes on device close Stephen Hemminger
2026-05-08 19:10 ` [PATCH v2 4/4] net/axgbe: fix descriptor status out-of-bounds access Stephen Hemminger
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=20260508191109.734377-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/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