Bug 84950 - [CVE-2018-12934] UBSAN: libiberty/cplus-dem.c:4430:3: runtime error: null pointer passed as argument 2, which is declared to never be null
Summary: [CVE-2018-12934] UBSAN: libiberty/cplus-dem.c:4430:3: runtime error: null poi...
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: demangler (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 85453 (view as bug list)
Depends on:
Blocks: ubsan
  Show dependency treegraph
 
Reported: 2018-03-19 12:29 UTC by Martin Liška
Modified: 2018-11-16 03:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2018-03-19 12:29:42 UTC
Following causes the run-time error:

$ cat /tmp/todo

_Q.__0
::Q.(void)
$ ./libiberty/testsuite/test-demangle < /tmp/todo
../../libiberty/cplus-dem.c:4430:3: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x402378 in remember_Ktype ../../libiberty/cplus-dem.c:4430
    #1 0x41bd85 in demangle_class ../../libiberty/cplus-dem.c:2688
    #2 0x41bd85 in demangle_signature ../../libiberty/cplus-dem.c:1556
    #3 0x41f211 in internal_cplus_demangle ../../libiberty/cplus-dem.c:1257
    #4 0x40cc3e in cplus_demangle ../../libiberty/cplus-dem.c:918
    #5 0x404a2c in main ../../../libiberty/testsuite/test-demangle.c:317
    #6 0x7ffff707ca86 in __libc_start_main (/lib64/libc.so.6+0x21a86)
    #7 0x405269 in _start (/home/marxin/Programming/gcc/objdir3/libiberty/testsuite/test-demangle+0x405269)
Comment 1 Andrew Pinski 2018-11-16 03:27:11 UTC
*** Bug 85453 has been marked as a duplicate of this bug. ***