heap buffer overflow crashes on memcmp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jhead (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
=======
==31124==ERROR: AddressSanitizer: heap-buffer-
READ of size 4 at 0x60200000eff2 thread T0
#0 0x7faf87682675 in memcmp (/usr/lib/
#1 0x41c42d in ReadJpegSections /home/mondaylor
#2 0x41f62d in ReadJpegSections /home/mondaylor
#3 0x41f62d in ReadJpegFile /home/mondaylor
#4 0x411987 in ProcessFile /home/mondaylor
#5 0x4036ca in main /home/mondaylor
#6 0x7faf8624b83f in __libc_start_main (/lib/x86_
#7 0x40d498 in _start (/home/
0x60200000eff2 is located 0 bytes to the right of 2-byte region [0x60200000eff0
allocated by thread T0 here:
#0 0x7faf876a3602 in malloc (/usr/lib/
#1 0x41beaa in ReadJpegSections /home/mondaylor
#2 0x41f62d in ReadJpegSections /home/mondaylor
#3 0x41f62d in ReadJpegFile /home/mondaylor
#4 0x411987 in ProcessFile /home/mondaylor
#5 0x4036ca in main /home/mondaylor
#6 0x7faf8624b83f in __libc_start_main (/lib/x86_
SUMMARY: AddressSanitizer: heap-buffer-
Shadow bytes around the buggy address:
0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c047fff9df0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa[02]fa
0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==31124==ABORTING