From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127206 invoked by alias); 10 Oct 2018 13:02:51 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 127095 invoked by uid 48); 10 Oct 2018 13:02:43 -0000 From: "wcventure at 126 dot com" To: elfutils-devel@sourceware.org Subject: [Bug tools/23755] New: Multiple floating point exception in findtextrel.c in eu-findtextrel biniary of elfutils-v.0174. Date: Wed, 10 Oct 2018 13:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: wcventure at 126 dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q4/txt/msg00011.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23755 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=3D11311&action=3Ded= it 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=3D2, argv=3D0x7ffffffedfc8) at findtex= trel.c:107 > 107 { > (gdb) c > Continuing. > Breakpoint 1, process_file (fname=3D0x7ffffffee247 "POC3-findtextrel", mo= re_than_one=3Dfalse) at findtextrel.c:418 > 418 (size_t) cnt < shdr->sh_size / shdr->sh_entsiz= e; > (gdb) p shdr->sh_entsize > $2 =3D 0 > (gdb) n >=20 > Program received signal SIGFPE, Arithmetic exception. > 0x0000000000403810 in process_file (fname=3D0x7ffffffee247 "POC3-findtext= rel", more_than_one=3Dfalse) at findtextrel.c:418 > 418 (size_t) cnt < shdr->sh_size / shdr->sh_entsiz= e; --=20 You are receiving this mail because: You are on the CC list for the bug.