[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/28296] New: [nm] Stack overflow in demangler_path
From: |
irfanariq at kaist dot ac.kr |
Subject: |
[Bug binutils/28296] New: [nm] Stack overflow in demangler_path |
Date: |
Tue, 31 Aug 2021 12:48:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28296
Bug ID: 28296
Summary: [nm] Stack overflow in demangler_path
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: irfanariq at kaist dot ac.kr
Target Milestone: ---
Created attachment 13642
--> https://sourceware.org/bugzilla/attachment.cgi?id=13642&action=edit
poc and full stack trace
Hello,
We are currently working on fuzz testing feature, and we found a stack overflow
error on nm.
The stack traces are as follow:
==618==ERROR: AddressSanitizer: stack-overflow on address 0x7fff51a74ea8 (pc
0x7f55b9e42509 bp 0x7fff51a75710 sp 0x7fff51a74e80 T0)
#0 0x7f55b9e42508 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79508)
#1 0x5592e730643c in str_buf_append rust-demangle.c:1493
#2 0x5592e7306483 in str_buf_demangle_callback rust-demangle.c:1500
#3 0x5592e72fffc4 in print_str rust-demangle.c:273
#4 0x5592e7302b82 in demangle_path rust-demangle.c:746
#5 0x5592e7302c00 in demangle_path rust-demangle.c:756
#6 0x5592e7303d65 in demangle_type rust-demangle.c:1031
#7 0x5592e7303cd3 in demangle_type rust-demangle.c:1024
#8 0x5592e7303348 in demangle_type rust-demangle.c:903
#9 0x5592e7302b91 in demangle_path rust-demangle.c:747
#10 0x5592e7302c00 in demangle_path rust-demangle.c:756
#11 0x5592e7303d65 in demangle_type rust-demangle.c:1031
#12 0x5592e7303cd3 in demangle_type rust-demangle.c:1024
#13 0x5592e7303348 in demangle_type rust-demangle.c:903
#14 0x5592e7302b91 in demangle_path rust-demangle.c:747
#15 0x5592e7302c00 in demangle_path rust-demangle.c:756
...
The full stack trace is attached.
**Step to reproduce**
We configured nm using
$ CFLAGS="-g -O0 -fsanitize=address" ./configure --disable-shared
--enable-targets=all
, and built it using
$ make -j10; make install
, and run it with:
$ ./nm -C <input file>
The input file is attached.
**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.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/28296] New: [nm] Stack overflow in demangler_path,
irfanariq at kaist dot ac.kr <=