[Bug tools/23755] New: Multiple floating point exception in findtextrel.c in eu-findtextrel biniary of elfutils-v.0174.
wcventure at 126 dot com
sourceware-bugzilla@sourceware.org
Wed Oct 10 13:02:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23755
Bug ID: 23755
Summary: Multiple floating point exception in findtextrel.c in
eu-findtextrel biniary of elfutils-v.0174.
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: tools
Assignee: unassigned at sourceware dot org
Reporter: wcventure at 126 dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 11311
--> https://sourceware.org/bugzilla/attachment.cgi?id=11311&action=edit
POC
Hi,
I found some floating point exception in findtextrel.c in eu-findtextrel of the
latest elfutils-0.174 code base. I have confirmed them with GDB and address
sanitizer.
Here are the POC files. I'll also show you the debugging process. It seems that
this is caused by the divide-by-zero problem.
> gdb --args ./eu-findtextrel POC3-findtextrel
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
> ...
> Reading symbols from ./eu-findtextrel...done.
> (gdb) b 418
> Breakpoint 1 at 0x40379c: file findtextrel.c, line 418.
> (gdb) start
> Temporary breakpoint 2, main (argc=2, argv=0x7ffffffedfc8) at findtextrel.c:107
> 107 {
> (gdb) c
> Continuing.
> Breakpoint 1, process_file (fname=0x7ffffffee247 "POC3-findtextrel", more_than_one=false) at findtextrel.c:418
> 418 (size_t) cnt < shdr->sh_size / shdr->sh_entsize;
> (gdb) p shdr->sh_entsize
> $2 = 0
> (gdb) n
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x0000000000403810 in process_file (fname=0x7ffffffee247 "POC3-findtextrel", more_than_one=false) at findtextrel.c:418
> 418 (size_t) cnt < shdr->sh_size / shdr->sh_entsize;
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list