From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1786] dumpcap crashes with segmentation fault when capturing from af_packet
Date: Fri, 12 Sep 2025 07:49:49 +0000 [thread overview]
Message-ID: <bug-1786-3@https.bugs.dpdk.org/> (raw)
[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1786
Bug ID: 1786
Summary: dumpcap crashes with segmentation fault when capturing
from af_packet
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: kerem.aksu@i2i-systems.com
Target Milestone: ---
dumpcap crashes when capturing traffic from af_packet ethernet device.
$ ./dpdk-dumpcap -i 0
Capturing on 'net_af_packet0'
File: /tmp/dpdk-dumpcap_0_net_af_packet0_20250912103908.pcapng
Thread 1 "dpdk-dumpcap" received signal SIGSEGV, Segmentation fault.
0x00007ffff7e46d78 in strlcpy () from /lib/x86_64-linux-gnu/libbsd.so.0
#0 0x00007ffff7e46d78 in strlcpy () from /lib/x86_64-linux-gnu/libbsd.so.0
#1 0x0000555556406faa in eth_dev_change_flags (if_name=0x560490350da0 <error:
Cannot access memory at address 0x560490350da0>, flags=256, mask=4294967295) at
../drivers/net/af_packet/rte_eth_af_packet.c:592
#2 0x0000555556407080 in eth_dev_promiscuous_enable (dev=0x55555b38d680
<rte_eth_devices>) at ../drivers/net/af_packet/rte_eth_af_packet.c:613
#3 0x0000555556211eb1 in rte_eth_promiscuous_enable (port_id=0) at
../lib/ethdev/rte_ethdev.c:2680
#4 0x0000555555629a49 in enable_pdump (r=0x15b438040, mp=0x15ba3c900) at
../app/dumpcap/main.c:688
#5 0x000055555562af5b in main (argc=3, argv=0x7fffffffe448) at
../app/dumpcap/main.c:818
dumpcap tries to enable promiscuous mode on the host device but it cannot
access device name and crashes.
I think problem caused by a strdup(3) within rte_eth_af_packet.c:744 struct
pmd_internals * (internals)->if_name is allocated with strdup(3) which is not
accessible from secondary process (in this context dumpcap).
Allocating this field with rte_malloc probably will fix the issue.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 3970 bytes --]
reply other threads:[~2025-09-12 7:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-1786-3@https.bugs.dpdk.org/ \
--to=bugzilla@dpdk.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;
as well as URLs for NNTP newsgroup(s).