[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/28995] New: There is a stack exhausion in the nm-new
From: |
kdsjzh at gmail dot com |
Subject: |
[Bug binutils/28995] New: There is a stack exhausion in the nm-new |
Date: |
Wed, 23 Mar 2022 14:42:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28995
Bug ID: 28995
Summary: There is a stack exhausion in the nm-new
Product: binutils
Version: 2.39 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: kdsjzh at gmail dot com
Target Milestone: ---
Created attachment 14033
--> https://sourceware.org/bugzilla/attachment.cgi?id=14033&action=edit
poc for nm-new
### short description
in the latest commit there is a stack-overflow in nm-new, which can be
triggered via a crafted elf file.
### step to reproduce
compile using CC="clang -fsanitize=address" CXX="clang++ -fsanitize=address"
./configure --disable-shared && make -j$(nproc)
./nm-new -C $POC
### ASAN output
00000000 A pRYAaca_NRYAaca_a
00000000 A _RYAa
00000000 A _RYAaca_a
00000000 A _RYAaca_a
00000000 A _RYAaca_a
AddressSanitizer:DEADLYSIGNAL
=================================================================
==24336==ERROR: AddressSanitizer: stack-overflow on address 0x7fffff7fef60 (pc
0x0000007b5cc7 bp 0x7fffff7ff110 sp 0x7fffff7fef60 T0)
#0 0x7b5cc6
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b5cc6)
#1 0x7b65df
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b65df)
#2 0x7b65df
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b65df)
#3 0x7b65df
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b65df)
#4 0x7b65df
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b65df)
...
#249 0x7b65df
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b65df)
SUMMARY: AddressSanitizer: stack-overflow
(/home/hzheng/workspace/reproduce/binutils-gdb/binutils/nm-new+0x7b5cc6)
==24336==ABORTING
### environment
Ubuntu 18.04.6 LTS
clang version 6.0.0-1ubuntu2
binutils faf5e6ace8c6f82e11ad40393f531123515ce3e6
### Credit
Han Zheng, nipc
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/28995] New: There is a stack exhausion in the nm-new,
kdsjzh at gmail dot com <=
- [Bug binutils/28995] There is a stack exhausion in the nm-new, kdsjzh at gmail dot com, 2022/03/23
- [Bug binutils/28995] [BUG] stack exhausion in nm-new, function demangle_const, kdsjzh at gmail dot com, 2022/03/23
- [Bug binutils/28995] [BUG] stack exhausion in nm-new, function demangle_const, amodra at gmail dot com, 2022/03/23
- [Bug binutils/28995] [BUG] stack exhausion in nm-new, function demangle_const, kdsjzh at gmail dot com, 2022/03/24