./abcm2ps abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc
abcm2ps-8.13.20 (2018-02-21)
File abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:6:1: error: Bad character
6 |GABc dedB|dedB dec ^00B|c200000B
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:7: error: '\' ignored
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:18: error: Not a note
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:26: error: Not a note
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:28: error: Not a note
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:31: error: Too many notes in chord
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:32: error: Too many notes in chord
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:32: error: Not a note
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc:7:12: error: Chord not closed
7 |:g6gf \dBd[g2f).ed20c20c s0ddf|
^
=================================================================
==12611==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6250000028ff at pc 0x55ff23ed14cd bp 0x7fffc3d7d7f0 sp 0x7fffc3d7d7e8
READ of size 1 at 0x6250000028ff thread T0
#0 0x55ff23ed14cc in parse_line /home/hsalo/src/abcm2ps/abcparse.c:2149
#1 0x55ff23ed14cc in abc_parse /home/hsalo/src/abcm2ps/abcparse.c:164
#2 0x55ff23f8d010 in txt_add_eos /home/hsalo/src/abcm2ps/front.c:379
#3 0x55ff23f8d010 in frontend /home/hsalo/src/abcm2ps/front.c:891
#4 0x55ff23eaaf3e in treat_file /home/hsalo/src/abcm2ps/abcm2ps.c:239
#5 0x55ff23ea72b6 in main /home/hsalo/src/abcm2ps/abcm2ps.c:1040
#6 0x7f2a28e7f2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#7 0x55ff23ea9649 in _start (/home/hsalo/src/abcm2ps/abcm2ps+0x37649)
0x6250000028ff is located 1 bytes to the left of 8192-byte region [0x625000002900,0x625000004900)
allocated by thread T0 here:
#0 0x7f2a295c3d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
#1 0x55ff23f8a697 in txt_add /home/hsalo/src/abcm2ps/front.c:109
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/abcm2ps/abcparse.c:2149 in parse_line
Shadow bytes around the buggy address:
0x0c4a7fff84c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fff84d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fff84e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fff84f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fff8500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c4a7fff8510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
0x0c4a7fff8520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fff8530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fff8540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fff8550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fff8560: 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
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
Left alloca redzone: ca
Right alloca redzone: cb
==12611==ABORTING
Reproducer: abcm2ps-heap-buffer-overflow-abcparse.c-parse_line.abc.zip (SHA1: a9b2a139ef095743544fbf78fb68291ac4549f37) Tested in: 070cfe675580d8deb01227ade7fb854a4ebee641 Fuzzing tool used: afl-2.52b