<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 12: Heap-based Buffer Overflow in the parse_line() function</title><link>https://sourceforge.net/p/mcpp/bugs/12/</link><description>Recent changes to 12: Heap-based Buffer Overflow in the parse_line() function</description><atom:link href="https://sourceforge.net/p/mcpp/bugs/12/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 26 Mar 2024 16:19:33 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mcpp/bugs/12/feed.rss" rel="self" type="application/rss+xml"/><item><title>#12 Heap-based Buffer Overflow in the parse_line() function</title><link>https://sourceforge.net/p/mcpp/bugs/12/?limit=25#6c6e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;For anyone looking at this thread currently ... this was fixed back in 2019 by the Debian maintainers with 03-gniibe-fix-11.patch&lt;/p&gt;
&lt;p&gt;I have applied a slightly modified version of that patch here ...&lt;br/&gt;
&lt;a href="https://github.com/jbrandwood/mcpp/commit/f6f6e7363101e4fd948bea5626d6ba74efa45b73" rel="nofollow"&gt;https://github.com/jbrandwood/mcpp/commit/f6f6e7363101e4fd948bea5626d6ba74efa45b73&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Brandwood</dc:creator><pubDate>Tue, 26 Mar 2024 16:19:33 -0000</pubDate><guid>https://sourceforge.netc60c10fa4b6b18428f5746ba8b3b5e32acca6364</guid></item><item><title>Heap-based Buffer Overflow in the parse_line() function</title><link>https://sourceforge.net/p/mcpp/bugs/12/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Heap-based Buffer Overflow in the parse_line() function&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;While fuzzing mcpp with American Fuzzy Lop, I found a Heap-based&lt;br/&gt;
Buffer Overflow in the parse_line() function, in support.c L1748.&lt;/p&gt;
&lt;p&gt;Attaching a reproducer, issue can be reproduced by running:&lt;/p&gt;
&lt;p&gt;mcpp test-parse_line&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Frederic Cambus.&lt;/p&gt;
&lt;p&gt;=================================================================&lt;br/&gt;
==13892==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6310000287ff at pc 0x000000559f06 bp 0x7fff9884d810 sp 0x7fff9884d808&lt;br/&gt;
READ of size 1 at 0x6310000287ff thread T0&lt;br/&gt;
    #0 0x559f05 in parse_line /home/fcambus/mcpp-2.7.2/src/support.c:1748:38&lt;br/&gt;
    #1 0x550214 in get_ch /home/fcambus/mcpp-2.7.2/src/support.c:1580:13&lt;br/&gt;
    #2 0x513c1b in mcpp_main /home/fcambus/mcpp-2.7.2/src/main.c:626:17&lt;br/&gt;
    #3 0x513396 in main /home/fcambus/mcpp-2.7.2/src/main.c:421:5&lt;br/&gt;
    #4 0x7fc025cfab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310&lt;br/&gt;
    #5 0x41a149 in _start (/home/fcambus/tmp-mcpp/mcpp+0x41a149)&lt;/p&gt;
&lt;p&gt;0x6310000287ff is located 1 bytes to the left of 65536-byte region [0x631000028800,0x631000038800)&lt;br/&gt;
allocated by thread T0 here:&lt;br/&gt;
    #0 0x4da000 in malloc (/home/fcambus/tmp-mcpp/mcpp+0x4da000)&lt;br/&gt;
    #1 0x556ae4 in xmalloc /home/fcambus/mcpp-2.7.2/src/support.c:2336:28&lt;br/&gt;
    #2 0x558e9f in parse_line /home/fcambus/mcpp-2.7.2/src/support.c:1666:17&lt;br/&gt;
    #3 0x550214 in get_ch /home/fcambus/mcpp-2.7.2/src/support.c:1580:13&lt;br/&gt;
    #4 0x513c1b in mcpp_main /home/fcambus/mcpp-2.7.2/src/main.c:626:17&lt;br/&gt;
    #5 0x513396 in main /home/fcambus/mcpp-2.7.2/src/main.c:421:5&lt;br/&gt;
    #6 0x7fc025cfab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310&lt;/p&gt;
&lt;p&gt;SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fcambus/mcpp-2.7.2/src/support.c:1748:38 in parse_line&lt;br/&gt;
Shadow bytes around the buggy address:&lt;br/&gt;
  0x0c627fffd0a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;br/&gt;
  0x0c627fffd0b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;br/&gt;
  0x0c627fffd0c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;br/&gt;
  0x0c627fffd0d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;br/&gt;
  0x0c627fffd0e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;br/&gt;
=&amp;gt;0x0c627fffd0f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa&lt;span&gt;[fa]&lt;/span&gt;&lt;br/&gt;
  0x0c627fffd100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br/&gt;
  0x0c627fffd110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br/&gt;
  0x0c627fffd120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br/&gt;
  0x0c627fffd130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br/&gt;
  0x0c627fffd140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br/&gt;
Shadow byte legend (one shadow byte represents 8 application bytes):&lt;br/&gt;
  Addressable:           00&lt;br/&gt;
  Partially addressable: 01 02 03 04 05 06 07 &lt;br/&gt;
  Heap left redzone:       fa&lt;br/&gt;
  Freed heap region:       fd&lt;br/&gt;
  Stack left redzone:      f1&lt;br/&gt;
  Stack mid redzone:       f2&lt;br/&gt;
  Stack right redzone:     f3&lt;br/&gt;
  Stack after return:      f5&lt;br/&gt;
  Stack use after scope:   f8&lt;br/&gt;
  Global redzone:          f9&lt;br/&gt;
  Global init order:       f6&lt;br/&gt;
  Poisoned by user:        f7&lt;br/&gt;
  Container overflow:      fc&lt;br/&gt;
  Array cookie:            ac&lt;br/&gt;
  Intra object redzone:    bb&lt;br/&gt;
  ASan internal:           fe&lt;br/&gt;
  Left alloca redzone:     ca&lt;br/&gt;
  Right alloca redzone:    cb&lt;br/&gt;
==13892==ABORTING&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Frederic Cambus</dc:creator><pubDate>Wed, 19 Jun 2019 11:07:25 -0000</pubDate><guid>https://sourceforge.net15ae4229e540c196b574688a54e2d33a34a7d638</guid></item></channel></rss>