https://sourceware.org/bugzilla/show_bug.cgi?id=33458
Bug ID: 33458
Summary: [BUG] A SEGV in _bfd_elf_strtab_delref at
elf-strtab.c:200
Product: binutils
Version: 2.45
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: yfzhang23 at stu dot pku.edu.cn
Target Milestone: ---
Created attachment 16354
--> https://sourceware.org/bugzilla/attachment.cgi?id=16354&action=edit
POC
## Description
- Version: Binutils 2.45
- Environment: Ubuntu 20.04.6 LTS, Clang 12.0.0
## Steps to reproduce
export CC="clang"
export CFLAGS="-g -fsanitize=address"
./configure
make -j
./ld/ld-new --version-exports-section symbol --shared $POC
## Sanitizer output
==762525==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x00000077c82d
bp 0x7ffcb0681880 sp 0x7ffcb0681850 T0)
==762525==The signal is caused by a READ memory access.
==762525==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 0x77c82d in _bfd_elf_strtab_delref
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elf-strtab.c:200:3
#1 0x72c60d in _bfd_elf_link_hash_hide_symbol
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elflink.c:8343:4
#2 0x660ee6 in _bfd_x86_elf_hide_symbol
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elfxx-x86.c:3619:3
#3 0x6f9057 in _bfd_elf_link_hide_sym_by_version
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elflink.c:2602:4
#4 0x649e23 in _bfd_x86_elf_link_symbol_references_local
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elfxx-x86.c:3655:7
#5 0x620d44 in elf_x86_64_relocate_section
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elf64-x86-64.c:3600:12
#6 0x746b2e in elf_link_input_bfd
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elflink.c:11926:10
#7 0x734442 in bfd_elf_final_link
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elflink.c:13185:11
#8 0x542fc9 in ldwrite
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/ld/ldwrite.c:548:8
#9 0x53a80d in main
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/ld/./ldmain.c:912:3
#10 0x7f193c0f2082 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x24082)
#11 0x41d69d in _start (/box/ld-new-2025-1178+0x41d69d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/benchmark/RUNDIR-binutils-2.45/binutils-2.45/bfd/elf-strtab.c:200:3 in
_bfd_elf_strtab_delref
==762525==ABORTING
## Credit
Reported by Yifan Zhang, [PLL](https://pl.cs.pku.edu.cn/en/)
--
You are receiving this mail because:
You are on the CC list for the bug.