heap overflow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jhead (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
# enviroment
ubuntu 18.04
./jhead poc
# version
3.04
# asan out
=======
==27663==ERROR: AddressSanitizer: heap-buffer-
READ of size 1 at 0x61d000000a08 thread T0
#0 0x562527b27ea7 in ProcessGpsInfo gpsinfo.c:126
#1 0x562527b194d5 in ProcessExifDir exif.c:866
#2 0x562527b1a95a in process_EXIF exif.c:1041
#3 0x562527b06382 in ReadJpegSections jpgfile.c:287
#4 0x562527b0790e in ReadJpegSections jpgfile.c:126
#5 0x562527b0790e in ReadJpegFile jpgfile.c:379
#6 0x562527afd66c in ProcessFile jhead.c:905
#7 0x562527af8b2e in main jhead.c:1756
#8 0x7f3c2ea7fbf6 in __libc_start_main (/lib/x86_
#9 0x562527afb279 in _start (/home/
0x61d000000a08 is located 66 bytes to the right of 2374-byte region [0x61d000000080
allocated by thread T0 here:
#0 0x7f3c2f2cbb40 in __interceptor_
#1 0x562527b04d6b in ReadJpegSections jpgfile.c:173
SUMMARY: AddressSanitizer: heap-buffer-
Shadow bytes around the buggy address:
0x0c3a7fff80f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a7fff8100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a7fff8110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a7fff8120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a7fff8130: 00 00 00 00 00 00 00 00 06 fa fa fa fa fa fa fa
=>0x0c3a7fff8140: fa[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a7fff8150: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a7fff8160: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a7fff8170: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a7fff8180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a7fff8190: 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
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
==27663==ABORTING