public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug general/25831] New: Assertion failure in eu-objdump
@ 2020-04-16  6:28 nguyenmanhdung1710 at gmail dot com
  2020-04-16 13:54 ` [Bug general/25831] " mark at klomp dot org
  2020-04-21 20:29 ` mark at klomp dot org
  0 siblings, 2 replies; 3+ messages in thread
From: nguyenmanhdung1710 at gmail dot com @ 2020-04-16  6:28 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=25831

            Bug ID: 25831
           Summary: Assertion failure in eu-objdump
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: nguyenmanhdung1710 at gmail dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 12465
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12465&action=edit
PoC for an assertion failure

Hi,

An assertion failure was discovered in the latest commit 1a9fe4b of elfutils
0.179, as demonstrated by eu-objdump via a crafted file.

To reproduce: eu-objdump -d PoC

Valgrind says:
objdump: ../../libcpu/i386_disasm.c:449: x86_64_disasm: Assertion
`correct_prefix == 0 || (prefixes & correct_prefix) != 0' failed.
==6901== 
==6901== Process terminating with default action of signal 6 (SIGABRT)
==6901==    at 0x56F5428: raise (raise.c:54)
==6901==    by 0x56F7029: abort (abort.c:89)
==6901==    by 0x56EDBD6: __assert_fail_base (assert.c:92)
==6901==    by 0x56EDC81: __assert_fail (assert.c:101)
==6901==    by 0x47BF64: x86_64_disasm (i386_disasm.c:448)
==6901==    by 0x4E4ECE0: disasm_cb (disasm_cb.c:178)
==6901==    by 0x407017: show_disasm (objdump.c:737)
==6901==    by 0x407017: handle_elf (objdump.c:783)
==6901==    by 0x4029BD: process_file (objdump.c:251)
==6901==    by 0x4029BD: main (objdump.c:164)

Thanks,
Manh Dung

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug general/25831] Assertion failure in eu-objdump
  2020-04-16  6:28 [Bug general/25831] New: Assertion failure in eu-objdump nguyenmanhdung1710 at gmail dot com
@ 2020-04-16 13:54 ` mark at klomp dot org
  2020-04-21 20:29 ` mark at klomp dot org
  1 sibling, 0 replies; 3+ messages in thread
From: mark at klomp dot org @ 2020-04-16 13:54 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=25831

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-04-16
                 CC|                            |mark at klomp dot org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
It is bad code and so correct to reject it. But we can reject it without
asserting and just printing "(bad)". Proposed patch:
https://sourceware.org/pipermail/elfutils-devel/2020q2/002619.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug general/25831] Assertion failure in eu-objdump
  2020-04-16  6:28 [Bug general/25831] New: Assertion failure in eu-objdump nguyenmanhdung1710 at gmail dot com
  2020-04-16 13:54 ` [Bug general/25831] " mark at klomp dot org
@ 2020-04-21 20:29 ` mark at klomp dot org
  1 sibling, 0 replies; 3+ messages in thread
From: mark at klomp dot org @ 2020-04-21 20:29 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=25831

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
Pushed the fix:

commit 25d40a626d36c140c8bb309f410f25af2836ec9b
Author: Mark Wielaard <mark@klomp.org>
Date:   Thu Apr 16 15:41:57 2020 +0200

    libcpu: Replace assert with goto invalid_op for bad prefix.

    https://sourceware.org/bugzilla/show_bug.cgi?id=25831

    Signed-off-by: Mark Wielaard <mark@klomp.org>

-- 
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:[~2020-04-21 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  6:28 [Bug general/25831] New: Assertion failure in eu-objdump nguyenmanhdung1710 at gmail dot com
2020-04-16 13:54 ` [Bug general/25831] " mark at klomp dot org
2020-04-21 20:29 ` 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).