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 70992A0032; Sat, 2 Oct 2021 17:41:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17010411A0; Sat, 2 Oct 2021 17:41:47 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id D9ABD4067B for ; Sat, 2 Oct 2021 17:41:45 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id BCF85A0547; Sat, 2 Oct 2021 17:41:45 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Sat, 02 Oct 2021 15:41:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: other X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david.marchand@redhat.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: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 819] [asan] lpm: buffer overflow in lpm6_autotest 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 Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D819 Bug ID: 819 Summary: [asan] lpm: buffer overflow in lpm6_autotest Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: other Assignee: dev@dpdk.org Reporter: david.marchand@redhat.com Target Milestone: --- This issue was caught by ASAN. To reproduce, please look at the last patch of series 18997: https://github.com/ovsrobot/dpdk/commit/series_18997 36/94 DPDK:fast-tests / lpm6_autotest FAIL 6.54 s (exit status = 1) --- command --- DPDK_TEST=3D'lpm6_autotest' /home/runner/work/dpdk/dpdk/build/app/test/dpdk= -test -l 0-1 --file-prefix=3Dlpm6_autotest --- stdout --- RTE>>lpm6_autotest --- stderr --- EAL: Detected 2 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected shared linkage of DPDK EAL: WARNING! Base virtual address hint (0x100005000 !=3D 0x7f26bdb3b000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: Multi-process socket /var/run/dpdk/lpm6_autotest/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: WARNING! Base virtual address hint (0x10000b000 !=3D 0x7f26ac739000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x100011000 !=3D 0x7f26ac59f000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x100a12000 !=3D 0x7f22aaa00000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x100c17000 !=3D 0x7f26ac53e000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x101618000 !=3D 0x7f1eaa800000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x10181d000 !=3D 0x7f26ac39f000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x10221e000 !=3D 0x7f1aaa600000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x102423000 !=3D 0x7f26ac33e000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes EAL: WARNING! Base virtual address hint (0x102e24000 !=3D 0x7f16aa400000) n= ot respected! EAL: This may cause issues with mapping memory into secondary processes APP: HPET is not enabled, using TSC as default timer RING: Cannot reserve memory HASH: memory allocation failed LPM: LPM rules hash table allocation failed: File exists (17)=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D25187=3D=3DERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffdded97cf0 at pc 0x7f26b76a2206 bp 0x7ffdded972b0 sp 0x7ffdded972a8 READ of size 4 at 0x7ffdded97cf0 thread T0 #0 0x7f26b76a2205 in __rte_jhash_2hashes /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_jhash.h:129:9 #1 0x7f26b76a1690 in rte_jhash_2hashes /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_jhash.h:238:2 #2 0x7f26b76a15be in rte_jhash /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_jhash.h:284:2 #3 0x7f26b767d042 in rule_hash /home/runner/work/dpdk/dpdk/build/../lib/lpm/rte_lpm6.c:160:9 #4 0x7f26b9727627 in rte_hash_hash /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_cuckoo_hash.c:538:9 #5 0x7f26b9736926 in rte_hash_lookup_data /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_cuckoo_hash.c:1449:45 #6 0x7f26b76a6982 in rule_find_with_key /home/runner/work/dpdk/dpdk/build/../lib/lpm/rte_lpm6.c:454:8 #7 0x7f26b769b4dd in rule_add /home/runner/work/dpdk/dpdk/build/../lib/lpm/rte_lpm6.c:497:15 #8 0x7f26b767da05 in rte_lpm6_add /home/runner/work/dpdk/dpdk/build/../lib/lpm/rte_lpm6.c:882:20 #9 0x16d1ef9 in test9 /home/runner/work/dpdk/dpdk/build/../app/test/test_lpm6.c:456:11 #10 0x16de5cc in test_lpm6 /home/runner/work/dpdk/dpdk/build/../app/test/test_lpm6.c:1784:12 #11 0x4d6166 in cmd_autotest_parsed /home/runner/work/dpdk/dpdk/build/../app/test/commands.c:71:10 #12 0x7f26ba2956c5 in cmdline_parse /home/runner/work/dpdk/dpdk/build/../lib/cmdline/cmdline_parse.c:290:3 #13 0x7f26ba28e8d5 in cmdline_valid_buffer /home/runner/work/dpdk/dpdk/build/../lib/cmdline/cmdline.c:26:8 #14 0x7f26ba29ff07 in rdline_char_in /home/runner/work/dpdk/dpdk/build/../lib/cmdline/cmdline_rdline.c:421:5 #15 0x7f26ba28f03f in cmdline_in /home/runner/work/dpdk/dpdk/build/../lib/cmdline/cmdline.c:149:9 #16 0x5ac68e in main /home/runner/work/dpdk/dpdk/build/../app/test/test.c:214:8 #17 0x7f26b28ecbf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310 #18 0x42ea19 in _start (/home/runner/work/dpdk/dpdk/build/app/test/dpdk-test+0x42ea19) Address 0x7ffdded97cf0 is located in stack of thread T0 at offset 48 in fra= me #0 0x7f26b769b36f in rule_add /home/runner/work/dpdk/dpdk/build/../lib/lpm/rte_lpm6.c:488 This frame has 2 object(s): [32, 49) 'rule_key' (line 490) <=3D=3D Memory access at offset 48 parti= ally overflows this variable [96, 100) 'unused' (line 491) HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /home/runner/work/dpdk/dpdk/build/../lib/hash/rte_jhash.h:129:9 in __rte_jhash_2hashes Shadow bytes around the buggy address: 0x10003bdaaf40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003bdaaf50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003bdaaf60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003bdaaf70: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 0x10003bdaaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =3D>0x10003bdaaf90: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00[01]f2 0x10003bdaafa0: f2 f2 f2 f2 04 f3 f3 f3 00 00 00 00 00 00 00 00 0x10003bdaafb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10003bdaafc0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 0x10003bdaafd0: 04 f2 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 0x10003bdaafe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07=20 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc =3D=3D25187=3D=3DABORTING --=20 You are receiving this mail because: You are the assignee for the bug.=