Bug 27946

Summary: using objdump -D with a file leads to an endless loop
Product: binutils Reporter: Liyi Zhang <l392zhan>
Component: binutilsAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 2.30   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Liyi Zhang 2021-06-03 08:16:50 UTC
OS:
Linux

Affected component
objdump - GNU objdump (GNU Binutils) 2.30
executable file link: https://github.com/l392zhan/AttentionFuzzer/blob/main/objdump/objdump

Attack vector(s)
execute the program with "objdump -D attack_vector" command can cause the process run forever. After debugging the program through GDB, we found that there is an endless loop, which starts from function elf_parse_notes, which is a function defined in elf.c file, and ends at a fixed address.
attack vectors link: https://github.com/l392zhan/AttentionFuzzer/tree/main/objdump/attack-vector
GDB screenshot link: https://github.com/l392zhan/AttentionFuzzer/blob/main/objdump/GDB_screenshot.jpeg
Comment 1 Alan Modra 2021-06-03 09:53:16 UTC
No problem with current mainline objdump.