Git Product home page Git Product logo

mcpp's People

Contributors

hanxinke avatar sdrkun avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

mcpp's Issues

Heap-based Buffer Overflow in the do_msg function

Heap-based Buffer Overflow was found in the do_msg() function in support.c.This bug was recorded in sourceforge.net( https://sourceforge.net/p/mcpp/bugs/13/ ). And it got assigned CVE-2019-14274.
When I used the test file provided by sourceforge.net, I got the same output information.

/usr/local/bin/mcpp /root/test-do_msg01

=================================================================
==46768==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000001b8 at pc 0x00000042971d bp 0x7fff00209020 sp 0x7fff00209000
WRITE of size 1 at 0x6020000001b8 thread T0
#0 0x42971c in do_msg /root/packages/github/mcpp/src/support.c:2516
#1 0x42fb80 in cerror /root/packages/github/mcpp/src/support.c:2635
#2 0x42fb80 in scan_quote /root/packages/github/mcpp/src/support.c:867
#3 0x43099c in parse_line /root/packages/github/mcpp/src/support.c:1760
#4 0x42da13 in get_ch /root/packages/github/mcpp/src/support.c:1580
#5 0x402c6f in mcpp_main /root/packages/github/mcpp/src/main.c:628
#6 0x402c6f in main /root/packages/github/mcpp/src/main.c:423
#7 0x7f2262986b66 in __libc_start_main (/lib64/libc.so.6+0x25b66)
#8 0x4042b9 in _start (/usr/local/bin/mcpp+0x4042b9)

0x6020000001b8 is located 0 bytes to the right of 8-byte region [0x6020000001b0,0x6020000001b8)
allocated by thread T0 here:
#0 0x7f2262c74115 in malloc (/lib64/libasan.so.4+0x152115)
#1 0x428674 in do_msg /root/packages/github/mcpp/src/support.c:2461

SUMMARY: AddressSanitizer: heap-buffer-overflow /root/packages/github/mcpp/src/support.c:2516 in do_msg
Shadow bytes around the buggy address:
0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff8000: fa fa 00 06 fa fa 00 07 fa fa fd fa fa fa fd fa
0x0c047fff8010: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c047fff8020: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
=>0x0c047fff8030: fa fa fd fa fa fa 00[fa]fa fa fa fa fa fa fa fa
0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8080: 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
==46768==ABORTING

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.