https://sourceware.org/bugzilla/show_bug.cgi?id=27501
Bug ID: 27501 Summary: eu-readelf hang while process crafted file Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: unassigned at sourceware dot org Reporter: polaalemu at gmail dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 13276 --> https://sourceware.org/bugzilla/attachment.cgi?id=13276&action=edit hang test case Hi, A hang was found in readelf v0.183 (the latest commit 35e49c) in function handle_symtab in readelf.c it seems verneed will always loop ,I didn't analysis deeply. bt [#0] 0x55555556a2d3 → handle_symtab(shdr=0x7fffffffd600, scn=0x5555555dfa58, ebl=<optimized out>) [#1] 0x55555556a2d3 → print_symtab(ebl=<optimized out>, type=0xb) [#2] 0x555555575b95 → process_elf_file(dwflmod=0x5555555de300, fd=<optimized out>) [#3] 0x555555578761 → process_dwflmod(dwflmod=0x5555555de300, userdata=<optimized out>, name=<optimized out>, base=<optimized out>, arg=0x7fffffffdb60) [#4] 0x7ffff7f7cc41 → dwfl_getmodules(dwfl=0x5555555de290, callback=0x555555578730 <process_dwflmod>, arg=0x7fffffffdb60, offset=0x0) [#5] 0x55555556b811 → process_file(fd=0x3, fname=0x7fffffffe0a9 "../eu-readelf_hangs/id:000000,src:002851,op:flip4,pos:5048", only_one=0x1) [#6] 0x5555555688de → main(argc=0x3, argv=0x7fffffffdce8) repruduce : eu-readelf -a [poc] -- You are receiving this mail because: You are on the CC list for the bug.