public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug demangler/98889] New: stack overflow in cxxfilt, peek, rust-demangle.c:85
@ 2021-01-29 12:08 featherrain26 at gmail dot com
  2022-01-22 17:55 ` [Bug demangler/98889] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: featherrain26 at gmail dot com @ 2021-01-29 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98889
           Summary: stack overflow in cxxfilt, peek, rust-demangle.c:85
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: demangler
          Assignee: unassigned at gcc dot gnu.org
          Reporter: featherrain26 at gmail dot com
  Target Milestone: ---

Created attachment 50085
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50085&action=edit
POC

Hi, there.

There is a stack overflow in the newest version(2eda57ef) of cxxfilt,
rust-demangle.c:85 related to path demangling, which directly causes a
segmentation fault.

To reproduce, run
cxxfilt < poc

Here is the trace reported by ASAN:
ASAN:SIGSEGV
=================================================================
==52498==ERROR: AddressSanitizer: stack-overflow on address 0x7ffeeb551ff8 (pc
0x0000009768c0 bp 0x7ffeebd4f8b0 sp 0x7ffeeb551ff8 T0)
    #0 0x9768bf in peek ../../libiberty/rust-demangle.c:85
    #1 0x9768bf in next ../../libiberty/rust-demangle.c:105
    #2 0x9768bf in demangle_path ../../libiberty/rust-demangle.c:674

SUMMARY: AddressSanitizer: stack-overflow ../../libiberty/rust-demangle.c:85
peek
==52498==ABORTING

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

* [Bug demangler/98889] stack overflow in cxxfilt, peek, rust-demangle.c:85
  2021-01-29 12:08 [Bug demangler/98889] New: stack overflow in cxxfilt, peek, rust-demangle.c:85 featherrain26 at gmail dot com
@ 2022-01-22 17:55 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-22 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 99935.

*** This bug has been marked as a duplicate of bug 99935 ***

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

end of thread, other threads:[~2022-01-22 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 12:08 [Bug demangler/98889] New: stack overflow in cxxfilt, peek, rust-demangle.c:85 featherrain26 at gmail dot com
2022-01-22 17:55 ` [Bug demangler/98889] " 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).