From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B7B4A09EF; Wed, 16 Dec 2020 00:06:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 77867CA9B; Wed, 16 Dec 2020 00:06:04 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id A04D6CA95 for ; Wed, 16 Dec 2020 00:06:03 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 86FAEA09F0; Wed, 16 Dec 2020 00:06:02 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Tue, 15 Dec 2020 23:06:02 +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: 20.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stephen@networkplumber.org 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 attachments.created 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 602] rte_jhash: reading past end of stack X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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=3D602 Bug ID: 602 Summary: rte_jhash: reading past end of stack Product: DPDK Version: 20.11 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: other Assignee: dev@dpdk.org Reporter: stephen@networkplumber.org Target Milestone: --- Created attachment 138 --> https://bugs.dpdk.org/attachment.cgi?id=3D138&action=3Dedit Demo of rte_jhash bug Build the attached program with address-santize option on any architecture = but x86. Run with: $ jhash_demo 1.1.1.1 123 =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=3D23990=3D=3DERROR: AddressSanitizer: stack-buffer-overflow on address 0xffffe98f86c0 at pc 0xab6b23a9cb08 bp 0xffffe98f84c0 sp 0xffffe98f84e0 READ of size 4 at 0xffffe98f86c0 thread T0 #0 0xab6b23a9cb07 in __rte_jhash_2hashes (/tmp/jhash_demo+0x1b07) #1 0xab6b23a9e943 in rte_jhash_2hashes (/tmp/jhash_demo+0x3943) #2 0xab6b23a9ea77 in rte_jhash (/tmp/jhash_demo+0x3a77) #3 0xab6b23a9ed37 in hash_ip_port (/tmp/jhash_demo+0x3d37) #4 0xab6b23a9ef27 in main (/tmp/jhash_demo+0x3f27) #5 0xffc1a9b57ce3 in __libc_start_main (/lib/libc.so.6+0x20ce3) #6 0xab6b23a9bc53 (/tmp/jhash_demo+0xc53) Address 0xffffe98f86c0 is located in stack of thread T0 at offset 32 in fra= me #0 0xab6b23a9ec7b in hash_ip_port (/tmp/jhash_demo+0x3c7b) This frame has 1 object(s): [32, 34) 'port' <=3D=3D Memory access at offset 32 partially overflows = this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (/tmp/jhash_demo+0x1b07) in __rte_jhash_2hashes Shadow bytes around the buggy address: 0x200ffd31f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffd31f090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffd31f0a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffd31f0b0: 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 f2 f2 f2 f2 0x200ffd31f0c0: f2 f2 04 f2 f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 =3D>0x200ffd31f0d0: 00 00 00 00 f1 f1 f1 f1[02]f2 f2 f2 f3 f3 f3 f3 0x200ffd31f0e0: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 0x200ffd31f0f0: f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 0x200ffd31f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffd31f110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x200ffd31f120: 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 =3D=3D23990=3D=3DABORTING --=20 You are receiving this mail because: You are the assignee for the bug.=