public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug tools/27501] New: eu-readelf hang while process crafted file
@ 2021-03-03  3:31 polaalemu at gmail dot com
  2021-03-03 20:49 ` [Bug tools/27501] " mark at klomp dot org
  2023-08-16 14:51 ` mark at klomp dot org
  0 siblings, 2 replies; 3+ messages in thread
From: polaalemu at gmail dot com @ 2021-03-03  3:31 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-16 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03  3:31 [Bug tools/27501] New: eu-readelf hang while process crafted file polaalemu at gmail dot com
2021-03-03 20:49 ` [Bug tools/27501] " mark at klomp dot org
2023-08-16 14:51 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).