[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30888] New: nm: SEGV on unknow address at bfd/elf.c:9453 i
From: |
yan.cs10 at nycu dot edu.tw |
Subject: |
[Bug binutils/30888] New: nm: SEGV on unknow address at bfd/elf.c:9453 in _bfd_elf_slurp_version_tables |
Date: |
Mon, 25 Sep 2023 12:52:24 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30888
Bug ID: 30888
Summary: nm: SEGV on unknow address at bfd/elf.c:9453 in
_bfd_elf_slurp_version_tables
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 15127
--> https://sourceware.org/bugzilla/attachment.cgi?id=15127&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 alloc-dealloc-mismatch (INVALID vs free)
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_26
AddressSanitizer report:
$ /home/pt/sytseng/binutils-gdb-asan/binutils/nm-new -D ./poc_26
BFD: warning: ./pocs/poc_26 has a program header with invalid alignment
AddressSanitizer:DEADLYSIGNAL
=================================================================
==702781==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000002c (pc
0x564014e614cb bp 0x7ffe62815d40 sp 0x7ffe62815b50 T0)
==702781==The signal is caused by a READ memory access.
==702781==Hint: address points to the zero page.
#0 0x564014e614ca in _bfd_elf_slurp_version_tables
/home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9543
#1 0x564014e17cdd in bfd_elf64_slurp_symbol_table
/home/pt/sytseng/binutils-gdb-asan/bfd/elfcode.h:1278
#2 0x564014e5f705 in _bfd_elf_canonicalize_dynamic_symtab
/home/pt/sytseng/binutils-gdb-asan/bfd/elf.c:9285
#3 0x564014db0fcf in _bfd_generic_read_minisymbols
/home/pt/sytseng/binutils-gdb-asan/bfd/syms.c:834
#4 0x564014d826da in display_rel_file
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1413
#5 0x564014d83838 in display_file
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:1649
#6 0x564014d85827 in main
/home/pt/sytseng/binutils-gdb-asan/binutils/nm.c:2161
#7 0x7f5a56d20082 in __libc_start_main ../csu/libc-start.c:308
#8 0x564014d7c15d 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/bfd/elf.c:9543 in
_bfd_elf_slurp_version_tables
==702781==ABORTING
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/30888] New: nm: SEGV on unknow address at bfd/elf.c:9453 in _bfd_elf_slurp_version_tables,
yan.cs10 at nycu dot edu.tw <=