heap overflow

Bug #1921305 reported by XiaoyuHe
6
This bug affects 1 person
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-overflow on address 0x61d000000a08 at pc 0x562527b27ea8 bp 0x7ffe2a994bb0 sp 0x7ffe2a994ba0
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_64-linux-gnu/libc.so.6+0x21bf6)
    #9 0x562527afb279 in _start (/home/fuzz/jhead-3.04/jhead+0x12279)

0x61d000000a08 is located 66 bytes to the right of 2374-byte region [0x61d000000080,0x61d0000009c6)
allocated by thread T0 here:
    #0 0x7f3c2f2cbb40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x562527b04d6b in ReadJpegSections jpgfile.c:173

SUMMARY: AddressSanitizer: heap-buffer-overflow gpsinfo.c:126 in ProcessGpsInfo
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

Revision history for this message
XiaoyuHe (hello0011) wrote :
  • poc5 Edit (2.7 KiB, application/octet-stream)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.