[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30886] New: nm: SEGV on unknow address at nm.c:718 in prin
From: |
yan.cs10 at nycu dot edu.tw |
Subject: |
[Bug binutils/30886] New: nm: SEGV on unknow address at nm.c:718 in print_symname |
Date: |
Mon, 25 Sep 2023 12:33:44 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30886
Bug ID: 30886
Summary: nm: SEGV on unknow address at nm.c:718 in
print_symname
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 15125
--> https://sourceware.org/bugzilla/attachment.cgi?id=15125&action=edit
this poc with -D argument can crash nm-new in the latest version
Summary:
A crash caused when using nm
AddressSanitizer reported it as DEADLYSIGNAL
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.4 LTS
AMD Ryzen 5 3600X 6-Core Processor
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 -D ./poc_14
AddressSanitizer report:
$ /home/pt/sytseng/binutils-gdb-asan/binutils/nm-new -D ./poc_14
BFD: warning: ./pocs/poc_14 has a program header with invalid alignment
AddressSanitizer:DEADLYSIGNAL
=================================================================
==686862==ERROR: AddressSanitizer: SEGV on unknown address 0x621004000f30 (pc
0x55a5e809f56e bp 0x7ffff12488b0 sp 0x7ffff12487e0 T0)
==686862==The signal is caused by a READ memory access.
#0 0x55a5e809f56d in print_symname
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:718
#1 0x55a5e80a532b in print_symbol_info_bsd
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1873
#2 0x55a5e80a22c1 in print_symbol
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1228
#3 0x55a5e80a34e7 in print_symbols
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1388
#4 0x55a5e80a402e in display_rel_file
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1503
#5 0x55a5e80a4838 in display_file
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1649
#6 0x55a5e80a6827 in main
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:2161
#7 0x7f4230f78082 in __libc_start_main ../csu/libc-start.c:308
#8 0x55a5e809d15d in _start
(/home/pt/sytseng/binutils-gdb-asan/binutils/nm-new+0xa315d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:718 in print_symname
==686862==ABORTING
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/30886] New: nm: SEGV on unknow address at nm.c:718 in print_symname,
yan.cs10 at nycu dot edu.tw <=