https://sourceware.org/bugzilla/show_bug.cgi?id=28171
Bug ID: 28171 Summary: stack-overflow on `nm-new -C` Product: binutils Version: 2.38 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: shaohua.li at inf dot ethz.ch Target Milestone: --- Created attachment 13581 --> https://sourceware.org/bugzilla/attachment.cgi?id=13581&action=edit poc Hi there, I found a stack-overflow on `nm-new -C` with a fuzzer. - binutils version: 2.38(Head), commit af51804103a08cd1e12edc4f4a30eec2c5c4f9e8 - Compiler: clang12 - Platform: Ubuntu 18.04.5 LTS, x86_64 - Reproduce: run `nm-new -C poc` AddressSanitizer report: ==498==ERROR: AddressSanitizer: stack-overflow on address 0x7ffd9daa0d88 (pc 0x0000004967a6 bp 0x7ffd9daa15d0 sp 0x7ffd9daa0d90 T0) #0 0x4967a6 in __asan_memcpy (/out_bin/nm-new+0x4967a6) #1 0x163535e in str_buf_append /binutils_latest/repo/libiberty/./rust-demangle.c:1493:3 #2 0x1635278 in str_buf_demangle_callback /binutils_latest/repo/libiberty/./rust-demangle.c:1500:3 #3 0x1631f3b in print_str /binutils_latest/repo/libiberty/./rust-demangle.c:273:5 #4 0x163662c in demangle_type /binutils_latest/repo/libiberty/./rust-demangle.c:893:7 #5 0x1634b7f in demangle_path /binutils_latest/repo/libiberty/./rust-demangle.c:747:7 #6 0x16372f6 in demangle_type /binutils_latest/repo/libiberty/./rust-demangle.c:1031:7 ... -- You are receiving this mail because: You are on the CC list for the bug.