From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6841946ED5; Fri, 12 Sep 2025 09:49:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11F3A402DD; Fri, 12 Sep 2025 09:49:51 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id BF6C7402CC for ; Fri, 12 Sep 2025 09:49:49 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 9A13446ED6; Fri, 12 Sep 2025 09:49:49 +0200 (CEST) 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kerem.aksu@i2i-systems.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=17576633890.FAfFA5.3318953 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --17576633890.FAfFA5.3318953 Date: Fri, 12 Sep 2025 09:49:49 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1786 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=3D0x560490350da0 , flags=3D256, mask=3D429496= 7295) at ../drivers/net/af_packet/rte_eth_af_packet.c:592 #2 0x0000555556407080 in eth_dev_promiscuous_enable (dev=3D0x55555b38d680 ) at ../drivers/net/af_packet/rte_eth_af_packet.c:613 #3 0x0000555556211eb1 in rte_eth_promiscuous_enable (port_id=3D0) at ../lib/ethdev/rte_ethdev.c:2680 #4 0x0000555555629a49 in enable_pdump (r=3D0x15b438040, mp=3D0x15ba3c900) = at ../app/dumpcap/main.c:688 #5 0x000055555562af5b in main (argc=3D3, argv=3D0x7fffffffe448) 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 n= ot accessible from secondary process (in this context dumpcap).=20 Allocating this field with rte_malloc probably will fix the issue. --=20 You are receiving this mail because: You are the assignee for the bug.= --17576633890.FAfFA5.3318953 Date: Fri, 12 Sep 2025 09:49:49 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
Bug ID 1786
Summary dumpcap crashes with segmentation fault when capturing from a= f_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 tra=
ffic 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 fau=
lt.
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=3D0x560490350da0 &l=
t;error:
Cannot access memory at address 0x560490350da0>, flags=3D256, mask=3D429=
4967295) at
../drivers/net/af_packet/rte_eth_af_packet.c:592
#2  0x0000555556407080 in eth_dev_promiscuous_enable (dev=3D0x55555b38d680
<rte_eth_devices>) at ../drivers/net/af_packet/rte_eth_af_packet.c:613
#3  0x0000555556211eb1 in rte_eth_promiscuous_enable (port_id=3D0) at
../lib/ethdev/rte_ethdev.c:2680
#4  0x0000555555629a49 in enable_pdump (r=3D0x15b438040, mp=3D0x15ba3c900) =
at
../app/dumpcap/main.c:688
#5  0x000055555562af5b in main (argc=3D3, argv=3D0x7fffffffe448) 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 i=
s not
accessible from secondary process (in this context dumpcap).=20

Allocating this field with rte_malloc probably will fix the issue.
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --17576633890.FAfFA5.3318953--