Skip to contentSkip to conversation

use after free in af_xdp

DPDK/ethdev Bug 1440 [email protected] 1 participant 2 messages May 13, 2024 – Oct 23, 2025

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=1440

            Bug ID: 1440
           Summary: use after free in af_xdp
           Product: DPDK
           Version: 24.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
static uint16_t
af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) {

...

        for (i = 0; i < nb_pkts; i++) {
                mbuf = bufs[i];

                if (mbuf->pool == umem->mb_pool) {
...
                } else {
...
                        desc->addr = addr | offset;
                        rte_memcpy(pkt, rte_pktmbuf_mtod(mbuf, void *),
                                        desc->len);
                        rte_pktmbuf_free(mbuf);
                        count++;
                }

                tx_bytes += mbuf->pkt_len; <<< use after free above
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

http://bugs.dpdk.org/show_bug.cgi?id=1440

Thomas Monjalon ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Thomas Monjalon ([email protected]) --- Resolved in http://git.dpdk.org/dpdk/commit/?id=dd158749e8

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.