https://sourceware.org/bugzilla/show_bug.cgi?id=28306
Bug ID: 28306 Summary: nm-new: null pointer dereference in bfd_getl16 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 13650 --> https://sourceware.org/bugzilla/attachment.cgi?id=13650&action=edit dereference_poc Hi there, I found a dereference error when fuzzing `nm-new -l`. - Compiler: clang12 - Platform: Ubuntu 18.04.5 LTS, x86_64 - Reproduce: run `nm-new -l dereference_poc` AddressSanitizer report: ==2940==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000503094 bp 0x7ffe3d636ff0 sp 0x7ffe3d636fb0 T0) ==2940==The signal is caused by a READ memory access. ==2940==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 0x503094 in bfd_getl16 /binutils_latest/repo/bfd/libbfd.c:633:11 #1 0x9c15a1 in _bfd_mips_elf_reloc_unshuffle /binutils_latest/repo/bfd/elfxx-mips.c:2359:11 #2 0x9aec04 in mips16_gprel_reloc /binutils_latest/repo/bfd/elf64-mips.c:3666:3 #3 0x154b6b7 in bfd_perform_relocation /binutils_latest/repo/bfd/reloc.c:711:14 #4 0xa142f9 in _bfd_elf_mips_get_relocated_section_contents /binutils_latest/repo/bfd/elfxx-mips.c:13362:10 #5 0x4eaa6f in bfd_get_relocated_section_contents /binutils_latest/repo/bfd/bfd.c:2166:10 #6 0x1551708 in bfd_simple_get_relocated_section_contents /binutils_latest/repo/bfd/simple.c:298:14 #7 0x6aa68c in read_section /binutils_latest/repo/bfd/./dwarf2.c:582:7 #8 0x6a7327 in _bfd_dwarf2_slurp_debug_info /binutils_latest/repo/bfd/./dwarf2.c:4737:13 #9 0x6ab8b1 in _bfd_dwarf2_find_nearest_line /binutils_latest/repo/bfd/./dwarf2.c:4985:9 #10 0x5d0226 in _bfd_elf_find_line /binutils_latest/repo/bfd/elf.c:9234:10 #11 0x4d1ba0 in print_symbol /binutils_latest/repo/binutils/nm.c:1071:9 #12 0x4ceaeb in print_symbols /binutils_latest/repo/binutils/nm.c:1152:7 #13 0x4cd23c in display_rel_file /binutils_latest/repo/binutils/nm.c:1279:5 #14 0x4c97dd in display_file /binutils_latest/repo/binutils/nm.c:1446:7 #15 0x4c90db in main /binutils_latest/repo/binutils/nm.c:1965:12 #16 0x7f94667460b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #17 0x41c55d in _start (/out_bin/nm-new+0x41c55d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /binutils_latest/repo/bfd/libbfd.c:633:11 in bfd_getl16 ==2940==ABORTING -- You are receiving this mail because: You are on the CC list for the bug.