public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: out-of-bounds read / crash in elfutils tools (readelf, nm, ...) with malformed file
Date: Thu, 13 Nov 2014 22:51:47 +0100	[thread overview]
Message-ID: <20141113215147.GA20160@blokker.redhat.com> (raw)
In-Reply-To: 20141113203932.3508bcbc@pc

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

On Thu, Nov 13, 2014 at 08:39:32PM +0100, Hanno Böck wrote:
> Am Thu, 13 Nov 2014 15:45:26 +0100
> schrieb Mark Wielaard <mjw@redhat.com>:
> 
> > I pushed this now to master as attached.
> 
> still crashes readelf -a in
> id:000116,src:000000,op:flip32,pos:5554

> Program received signal SIGSEGV, Segmentation fault.
> 0xf7d96112 in vfprintf () from /lib32/libc.so.6

Sorry, you'll have to dig into that one a bit deeper yourself, since it
doesn't crash for me, even on a (Fedora 21 beta) i686 setup.

Maybe you could install debuginfo for glibc and see what is being
passed to printf that seem to cause it to crash.

> (gdb) bt
> #0  0xf7d96112 in vfprintf () from /lib32/libc.so.6
> #1  0xf7d9c5c8 in printf () from /lib32/libc.so.6
> #2  0x0805163c in handle_symtab (ebl=0x8078b58, scn=0x807a140,
> shdr=0xffffca5c) at readelf.c:2245
> #3  0x08050fbb in print_symtab (ebl=0x8078b58, type=2) at readelf.c:2139
> #4  0x0804cb06 in process_elf_file (dwflmod=0x80789e8, fd=3) at
> readelf.c:887 #5  0x0804c1f4 in process_dwflmod (dwflmod=0x80789e8,
> userdata=0x80789f0, name=0x8078af8
> "id:000116,src:000000,op:flip32,pos:5554", base=134512640,
> arg=0xffffcc8c) at readelf.c:691 #6  0xf7f38be4 in dwfl_getmodules ()
> from /usr/lib32/libdw.so.1 #7  0x0804c66a in process_file (fd=3, 
>     fname=0xffffcfe6 "id:000116,src:000000,op:flip32,pos:5554",
> only_one=true) at readelf.c:790
> #8  0x0804b13f in main (argc=3, argv=0xffffce04) at readelf.c:296

Are you sure you are using the git master sources?
The backtrace looks like it is using the system installed libdw.so.

Thanks,

Mark

             reply	other threads:[~2014-11-13 21:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 21:51 Mark Wielaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-13 21:55 
2014-11-13 19:39 
2014-11-13 14:45 Mark Wielaard
2014-11-11 16:57 Mark Wielaard
2014-11-11 13:57 
2014-11-11 13:53 Mark Wielaard
2014-11-11 13:49 Petr Machata
2014-11-11 13:40 
2014-11-11 13:30 Petr Machata
2014-11-11 13:15 Mark Wielaard
2014-11-11 10:31 
2014-11-10 20:58 Mark Wielaard
2014-11-09 21:59 
2014-11-09 16:57 Mark Wielaard
2014-11-08 16:10 
2014-11-08 15:32 Mark Wielaard
2014-11-08 14:04 Mark Wielaard
2014-11-07 16:13 
2014-11-07 15:45 Mark Wielaard
2014-11-07 15:32 
2014-11-07 11:58 Mark Wielaard
2014-11-07 11:51 Mark Wielaard
2014-11-07  0:27 
2014-11-06 18:25 Roland McGrath
2014-11-06 16:05 Mark Wielaard
2014-11-06 15:11 Mark Wielaard
2014-10-31 16:13 

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141113215147.GA20160@blokker.redhat.com \
    --to=mjw@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).