https://sourceware.org/bugzilla/show_bug.cgi?id=26946
Bug ID: 26946 Summary: [nm] memory allocation failed Product: binutils Version: 2.35.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: hao-wang20 at mails dot tsinghua.edu.cn Target Milestone: --- Created attachment 12997 --> https://sourceware.org/bugzilla/attachment.cgi?id=12997&action=edit asan-memory-allocation-failed Hello, I found a crash in nm-new when doing fuzzing experiments. And it can be reproduced in the master branch. I downloaded source code from git, and I built it with Ubuntu 18.04 with gcc 7.5.0 with ASAN, and the following command to build nm-new from the source: CFLAGS="-O1 -fsanitize=address -g" ./configure; make clean all; You can reproduce the crash with the following command: nm-new -l <attached file> The AddressSanitizer message of the crash is: ==48823==ERROR: AddressSanitizer failed to allocate 0xff00003000 (1095216672768) bytes of LargeMmapAllocator (error code: 12) ==48823==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_common.cc:118 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) #0 0x7f78c8f8abf2 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2) #1 0x7f78c8fa9575 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x108575) #2 0x7f78c8f94482 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xf3482) #3 0x7f78c8fa0895 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xff895) #4 0x7f78c8ec97fd (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x287fd) #5 0x7f78c8f7fb0a in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb0a) #6 0x55fe62a75ec7 in bfd_malloc /home/vul337/programs/psrc/binutils_bk/bfd/libbfd.c:275 #7 0x55fe62cbddeb in read_section dwarf2.c:566 #8 0x55fe62ccfae8 in decode_line_info dwarf2.c:2129 #9 0x55fe62ceb516 in comp_unit_maybe_decode_line_info dwarf2.c:3938 #10 0x55fe62ceb516 in comp_unit_find_line dwarf2.c:3972 #11 0x55fe62cf19bf in _bfd_dwarf2_find_nearest_line dwarf2.c:5100 #12 0x55fe62bb81f2 in _bfd_elf_find_line /home/vul337/programs/psrc/binutils_bk/bfd/elf.c:9212 #13 0x55fe62a1fcfe in print_symbol /home/vul337/programs/psrc/binutils_bk/binutils/nm.c:1031 #14 0x55fe62a23640 in print_symbols /home/vul337/programs/psrc/binutils_bk/binutils/nm.c:1112 #15 0x55fe62a23640 in display_rel_file /home/vul337/programs/psrc/binutils_bk/binutils/nm.c:1236 #16 0x55fe62a261d3 in display_file /home/vul337/programs/psrc/binutils_bk/binutils/nm.c:1403 #17 0x55fe62a1b237 in main /home/vul337/programs/psrc/binutils_bk/binutils/nm.c:1891 #18 0x7f78c88cdbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6) #19 0x55fe62a1d3c9 in _start (/home/vul337/programs/nm_master/nm-new+0xad3c9) -- You are receiving this mail because: You are on the CC list for the bug.