https://sourceware.org/bugzilla/show_bug.cgi?id=28174
Bug ID: 28174 Summary: Segment fault due to null pointer dereference in `nm-new -l` 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 13584 --> https://sourceware.org/bugzilla/attachment.cgi?id=13584&action=edit poc Hi there, I crashed `nm-new -l` with a fuzzer, which is due to a null pointer dereference in nm.c. - binutils version: 2.38(Head), commit af51804103a08cd1e12edc4f4a30eec2c5c4f9e8 - Compiler: clang12 - Platform: Ubuntu 18.04.5 LTS, x86_64 - Reproduce: run `nm-new -l poc` AddressSanitizer report: ==629==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004d1633 bp 0x7fff255c6aa0 sp 0x7fff255c6540 T0) ==629==The signal is caused by a READ memory access. ==629==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used. #0 0x4d1633 in print_symbol /binutils_latest/repo/binutils/nm.c:1052:13 #1 0x4ceaeb in print_symbols /binutils_latest/repo/binutils/nm.c:1152:7 #2 0x4cd23c in display_rel_file /binutils_latest/repo/binutils/nm.c:1279:5 #3 0x4c97dd in display_file /binutils_latest/repo/binutils/nm.c:1446:7 #4 0x4c90db in main /binutils_latest/repo/binutils/nm.c:1965:12 #5 0x7fb64a4e40b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #6 0x41c55d in _start (/out_bin/nm-new+0x41c55d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /binutils_latest/repo/binutils/nm.c:1052:13 in print_symbol ==629==ABORTING -- You are receiving this mail because: You are on the CC list for the bug.