* [dpdk-dev] [Bug 602] rte_jhash: reading past end of stack
@ 2020-12-15 23:06 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2020-12-15 23:06 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=602
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=138&action=edit
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
=================================================================
==23990==ERROR: 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 frame
#0 0xab6b23a9ec7b in hash_ip_port (/tmp/jhash_demo+0x3c7b)
This frame has 1 object(s):
[32, 34) 'port' <== 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
=>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
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
==23990==ABORTING
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 23:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 23:06 [dpdk-dev] [Bug 602] rte_jhash: reading past end of stack bugzilla
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).