public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug demangler/102130] New: [c++filt] Stack overflow in demangle_path
@ 2021-08-30 17:11 irfanariq at kaist dot ac.kr
  2021-08-31  7:20 ` [Bug demangler/102130] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: irfanariq at kaist dot ac.kr @ 2021-08-30 17:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102130

            Bug ID: 102130
           Summary: [c++filt] Stack overflow in demangle_path
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: demangler
          Assignee: unassigned at gcc dot gnu.org
          Reporter: irfanariq at kaist dot ac.kr
  Target Milestone: ---

Created attachment 51378
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51378&action=edit
poc and full stack trace

Hello,

We are currently working on fuzz testing feature, and we found a crash on
c++filt.

The stack traces are as follow:
==617==ERROR: AddressSanitizer: stack-overflow on address 0x7fffe1fa7ff8 (pc
0x555911cd5385 bp 0x7fffe1fa8140 sp 0x7fffe1fa8000 T0)
    #0 0x555911cd5384 in demangle_path rust-demangle.c:674
    #1 0x555911cd5e48 in demangle_path rust-demangle.c:774
    #2 0x555911cd56a1 in demangle_path rust-demangle.c:696
    #3 0x555911cd5e48 in demangle_path rust-demangle.c:774
    #4 0x555911cd56a1 in demangle_path rust-demangle.c:696
    ...
    #247 0x555911cd5e48 in demangle_path rust-demangle.c:774
    #248 0x555911cd56a1 in demangle_path rust-demangle.c:696
    #249 0x555911cd5e48 in demangle_path rust-demangle.c:774
    #250 0x555911cd56a1 in demangle_path rust-demangle.c:696
We also attach the full stack trace in the attachment.

**Step to reproduce**

We configured c++filt using 

$ CFLAGS="-g -O0 -fsanitize=address" ./configure --disable-shared
--enable-targets=all

,and built it using 

$ make -j10; make install 

,and run it with:

$ ./c++filt @<input file>

The input file is in the attachment.

**Environment**
- OS: Ubuntu 18.04.5 LTS
- GCC version: gcc 7.5.0
- binutils version: commit (7de7786bb7db5159fc8a7bfa3df72381ff16a38c) of master
branch on sourceware git
(https://sourceware.org/git/?p=binutils-gdb.git;a=tree;h=7de7786bb7db5159fc8a7bfa3df72381ff16a38c;hb=7de7786bb7db5159fc8a7bfa3df72381ff16a38c)

Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-27  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 17:11 [Bug demangler/102130] New: [c++filt] Stack overflow in demangle_path irfanariq at kaist dot ac.kr
2021-08-31  7:20 ` [Bug demangler/102130] " rguenth at gcc dot gnu.org
2021-08-31 12:45 ` irfanariq at kaist dot ac.kr
2021-09-05 10:57 ` amodra at gmail dot com
2021-12-27  8:24 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).