Bug 22197 - buffer overflow in bfd_get_debug_link_info_1
Summary: buffer overflow in bfd_get_debug_link_info_1
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.30 (HEAD)
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 09:48 UTC by Agostino Sarubbo
Modified: 2017-09-24 12:30 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed: 2017-09-24 00:00:00


Attachments
stacktrace (1.26 KB, text/plain)
2017-09-24 09:48 UTC, Agostino Sarubbo
Details
testcase (3.69 KB, application/x-executable)
2017-09-24 09:49 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo 2017-09-24 09:48:47 UTC
Created attachment 10466 [details]
stacktrace

On master at 52a93b95ec0771c97e26f0bb28630a271a667bd2:
# nm -V
GNU nm (Gentoo git) 2.29.51.20170924


Command to reproduce:
# nm -A -a -l -S -s --special-syms --synthetic --with-symbol-versions -D $FILE
Comment 1 Agostino Sarubbo 2017-09-24 09:49:28 UTC
Created attachment 10467 [details]
testcase
Comment 2 cvs-commit@gcc.gnu.org 2017-09-24 12:21:09 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=52b36c51e5bf6d7600fdc6ba115b170b0e78e31d

commit 52b36c51e5bf6d7600fdc6ba115b170b0e78e31d
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Sep 24 21:36:18 2017 +0930

    PR22197, buffer overflow in bfd_get_debug_link_info_1
    
    	PR 22197
    	* opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
    	within section bounds.
Comment 3 Alan Modra 2017-09-24 12:30:14 UTC
Fixed