Bug 22232 - NULL pointer dereference in load_specific_debug_section (objdump.c)
Summary: NULL pointer dereference in load_specific_debug_section (objdump.c)
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.30
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-01 08:23 UTC by Agostino Sarubbo
Modified: 2017-10-01 12:16 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed: 2017-10-01 00:00:00


Attachments
stacktrace (557 bytes, text/plain)
2017-10-01 08:23 UTC, Agostino Sarubbo
Details
testcase (3.73 KB, application/x-executable)
2017-10-01 08:23 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-10-01 08:23:22 UTC
Created attachment 10495 [details]
stacktrace

On 2.29.51.20171001:

#objdump -g -D -F -S --file-start-context -l -R -s -W -G -T --special-syms -x $FILE
Comment 1 Agostino Sarubbo 2017-10-01 08:23:45 UTC
Created attachment 10496 [details]
testcase
Comment 2 Alan Modra 2017-10-01 10:39:49 UTC
Bug in a recent patch of mine.
Comment 3 Sourceware Commits 2017-10-01 11:13:10 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit bfec0f11eadd7ed3597bc9b550a5595421a4cb31
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Oct 1 21:40:23 2017 +1030

    PR22232, NULL pointer dereference in load_specific_debug_section
    
    	PR 22232
    	PR 22230
    	* objdump.c (load_specific_debug_section): Introduce a temp to
    	stop bfd_get_full_section_contents NULLing out section->start.
Comment 4 Alan Modra 2017-10-01 12:16:57 UTC
Fixed.