Public bug reported: # enviroment ubuntu 18.04 ./jhead poc
# version 3.04 # asan out ================================================================= ==34259==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000106 at pc 0x55e0a14147a5 bp 0x7ffcd8d72e80 sp 0x7ffcd8d72e70 READ of size 1 at 0x611000000106 thread T0 #0 0x55e0a14147a4 in show_IPTC iptc.c:136 #1 0x55e0a13ec8bb in ProcessFile jhead.c:955 #2 0x55e0a13e7b2e in main jhead.c:1756 #3 0x7fa81c777bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6) #4 0x55e0a13ea279 in _start (/home/fuzz/jhead-3.04/jhead+0x12279) 0x611000000106 is located 0 bytes to the right of 198-byte region [0x611000000040,0x611000000106) allocated by thread T0 here: #0 0x7fa81cfc3b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40) #1 0x55e0a13f3d6b in ReadJpegSections jpgfile.c:173 SUMMARY: AddressSanitizer: heap-buffer-overflow iptc.c:136 in show_IPTC Shadow bytes around the buggy address: 0x0c227fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c227fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c227fff8020:[06]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8070: 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 ==34259==ABORTING ** Affects: jhead (Ubuntu) Importance: Undecided Status: New ** Attachment added: "poc file" https://bugs.launchpad.net/bugs/1921301/+attachment/5480683/+files/poc1 ** Information type changed from Private Security to Public -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1921301 Title: heap overflow To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/jhead/+bug/1921301/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs