[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30904] New: nm: SEGV at bfd/elf.c:2267 in _bfd_elf_get_dyn
From: |
yan.cs10 at nycu dot edu.tw |
Subject: |
[Bug binutils/30904] New: nm: SEGV at bfd/elf.c:2267 in _bfd_elf_get_dynamic_symbols |
Date: |
Tue, 26 Sep 2023 05:10:52 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30904
Bug ID: 30904
Summary: nm: SEGV at bfd/elf.c:2267 in
_bfd_elf_get_dynamic_symbols
Product: binutils
Version: 2.42 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: yan.cs10 at nycu dot edu.tw
Target Milestone: ---
Created attachment 15137
--> https://sourceware.org/bugzilla/attachment.cgi?id=15137&action=edit
this poc can crash nm-new in the latest version without arguments
Summary:
A crash caused when using nm
AddressSanitizer reported it as SEGV
git commit, OS, Compiler and processor:
git commit be8e83130
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Ubuntu 20.04.6 LTS
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Steps to reproduce:
$ cd binutils-gdb
$ export CFLAGS='-fsanitize=address -fsanitize-recover=address -g3'
$ export CXXFLAGS='-fsanitize=address -fsanitize-recover=address -g3'
$ make
$ binutils/nm-new ./poc_0
AddressSanitizer report:
$ /home/royyao/sytseng/binutils-gdb-asan/binutils/nm-new ./poc_0
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3624246==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000d0 (pc
0x559ec0952ce0 bp 0x7fffd5967ea0 sp 0x7fffd5967bf0 T0)
==3624246==The signal is caused by a READ memory access.
==3624246==Hint: address points to the zero page.
#0 0x559ec0952cdf in _bfd_elf_get_dynamic_symbols
/home/royyao/sytseng/binutils-gdb-asan/bfd/elf.c:2267
#1 0x559ec0938c7d in bfd_elf64_object_p
/home/royyao/sytseng/binutils-gdb-asan/bfd/elfcode.h:861
#2 0x559ec08c59a8 in bfd_check_format_matches
/home/royyao/sytseng/binutils-gdb-asan/bfd/format.c:431
#3 0x559ec08a77da in display_file
/home/royyao/sytseng/binutils-gdb-asan/binutils/nm.c:1645
#4 0x559ec08a9827 in main
/home/royyao/sytseng/binutils-gdb-asan/binutils/nm.c:2161
#5 0x7f4e61e94082 in __libc_start_main ../csu/libc-start.c:308
#6 0x559ec08a015d in _start
(/home/royyao/sytseng/binutils-gdb-asan/binutils/nm-new+0xa315d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/home/royyao/sytseng/binutils-gdb-asan/bfd/elf.c:2267 in
_bfd_elf_get_dynamic_symbols
==3624246==ABORTING
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/30904] New: nm: SEGV at bfd/elf.c:2267 in _bfd_elf_get_dynamic_symbols,
yan.cs10 at nycu dot edu.tw <=