[2019-08-06] - Found with American Fuzzy Lop - CVE-2019-14692 Heap-based buffer overflow in CmkjPlayer::load(), in src/mkj.cpp. ``` ================================================================= ==6090==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x612000000178 at pc 0x7fd68b04325b bp 0x7ffc1bb1fa10 sp 0x7ffc1bb1fa08 WRITE of size 2 at 0x612000000178 thread T0 #0 0x7fd68b04325a in CmkjPlayer::load(std::__cxx11::basic_string, std::allocator > const&, CFileProvider const&) /home/fcambus/adplug/src/mkj.cpp:51:21 #1 0x7fd68af8d1d5 in CAdPlug::factory(std::__cxx11::basic_string, std::allocator > const&, Copl*, CPlayers const&, CFileProvider const&) /home/fcambus/adplug/src/adplug.cpp:169:10 #2 0x4fcd62 in play(char const*, Player*, int) /home/fcambus/adplay-unix/src/adplay.cc:309:11 #3 0x4fbaf4 in main /home/fcambus/adplay-unix/src/adplay.cc:544:5 #4 0x7fd68a7cb09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a) #5 0x41f759 in _start (/home/fcambus/reps/adplay+0x41f759) 0x612000000178 is located 0 bytes to the right of 312-byte region [0x612000000040,0x612000000178) allocated by thread T0 here: #0 0x4f67e2 in operator new(unsigned long) (/home/fcambus/reps/adplay+0x4f67e2) #1 0x7fd68b042c17 in CmkjPlayer::factory(Copl*) /home/fcambus/adplug/src/mkj.cpp:30:10 #2 0x7fd68af8d11d in CAdPlug::factory(std::__cxx11::basic_string, std::allocator > const&, Copl*, CPlayers const&, CFileProvider const&) /home/fcambus/adplug/src/adplug.cpp:168:10 #3 0x4fcd62 in play(char const*, Player*, int) /home/fcambus/adplay-unix/src/adplay.cc:309:11 #4 0x4fbaf4 in main /home/fcambus/adplay-unix/src/adplay.cc:544:5 #5 0x7fd68a7cb09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fcambus/adplug/src/mkj.cpp:51:21 in CmkjPlayer::load(std::__cxx11::basic_string, std::allocator > const&, CFileProvider const&) Shadow bytes around the buggy address: 0x0c247fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c247fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c247fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c247fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c247fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c247fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[fa] 0x0c247fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8070: 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 Shadow gap: cc ==6090==ABORTING ```