[llvm-bugs] [Bug 32887] New: Stack-overflow in demangler (9)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 2 03:31:42 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32887
Bug ID: 32887
Summary: Stack-overflow in demangler (9)
Product: libc++abi
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: dungnguy at comp.nus.edu.sg
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Dear All,
This bug was found with AFLGo, a directed version of AFL/AFLFast. Thanks also
to Marcel Böhme and Van-Thuan Pham.
First, you need to build the project
(https://github.com/llvm-mirror/libcxxabi/blob/master/fuzz/cxa_demangle_fuzzer.cpp)
to obtain the binary file.
To reproduce:
$ printf "DTc" > test
$ for c in $(seq 1 15000); do printf "c"; done >> test; echo "" >> test; cat
test | ./cxa_demangle_fuzzer
Segmentation fault
==30298==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc68347ea0 (pc
0x000000531fc2 bp 0x7ffc68349830 sp 0x7ffc68347ea0 T0)
#0 0x531fc1 in char const* __cxxabiv1::(anonymous
namespace)::parse_type<__cxxabiv1::(anonymous namespace)::Db>(char const*, char
const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:1904
#1 0x6deaea in char const* __cxxabiv1::(anonymous
namespace)::parse_const_cast_expr<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:617:25
#2 0x6deaea in char const* __cxxabiv1::(anonymous
namespace)::parse_expression<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:3382
#3 0x6deb27 in char const* __cxxabiv1::(anonymous
namespace)::parse_const_cast_expr<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:620:30
#4 0x6deb27 in char const* __cxxabiv1::(anonymous
namespace)::parse_expression<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:3382
#5 0x6deb27 in char const* __cxxabiv1::(anonymous
namespace)::parse_const_cast_expr<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:620:30
#6 0x6deb27 in char const* __cxxabiv1::(anonymous
namespace)::parse_expression<__cxxabiv1::(anonymous namespace)::Db>(char
const*, char const*, __cxxabiv1::(anonymous namespace)::Db&)
/src/llvm_libcxxabi/src/cxa_demangle.cpp:3382
...
Regards,
Manh-Dung Nguyen
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170502/8be6b454/attachment-0001.html>
More information about the llvm-bugs
mailing list