public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "evvers at ya dot ru" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug libdw/28710] New: ERROR: AddressSanitizer: SEGV on unknown address (on i386)
Date: Fri, 17 Dec 2021 10:38:42 +0000	[thread overview]
Message-ID: <bug-28710-10460@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 28710
           Summary: ERROR: AddressSanitizer: SEGV on unknown address (on
                    i386)
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libdw
          Assignee: unassigned at sourceware dot org
          Reporter: evvers at ya dot ru
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 13861
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13861&action=edit
File triggering ASan

OSS-Fuzz reported a stack-use-after-return on i386 in
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42264. It can be
reproduced on an x86_64 Fedora machine by installing libc.i686, zlib-devel.i686
and libasan.i686 and building elfutils with -m32
```
autoreconf -i -f
./configure --enable-maintainer-mode --disable-debuginfod
--disable-libdebuginfod     --without-bzlib --without-lzma --without-zstd    
--enable-sanitize-address     CFLAGS="-m32 -g -O1" CXXFLAGS="-m32 -g -O1"
make -j$(nproc) V=1
$ ASAN_OPTIONS=detect_stack_use_after_return=1
LD_LIBRARY_PATH="./libdw;./libelf" ./src/stack --core ./oss-fuzz-42264
=================================================================
==13653==ERROR: AddressSanitizer: stack-use-after-return on address 0xf567a000
at pc 0xf7860e9b bp 0xffc10ae8 sp 0xffc10adc
READ of size 4 at 0xf567a000 thread T0
    #0 0xf7860e9a in dwfl_segment_report_module
/home/vagrant/elfutils/libdwfl/dwfl_segment_report_module.c:556
    #1 0xf786e251 in _new.dwfl_core_file_report
/home/vagrant/elfutils/libdwfl/core-file.c:559
    #2 0x804b78a in parse_opt /home/vagrant/elfutils/src/stack.c:595
    #3 0xf7457d4d in argp_parse (/lib/libc.so.6+0x11ed4d)
    #4 0x804caaa in main /home/vagrant/elfutils/src/stack.c:695
    #5 0xf735e468 in __libc_start_call_main (/lib/libc.so.6+0x25468)
    #6 0xf735e549 in __libc_start_main_impl (/lib/libc.so.6+0x25549)
    #7 0x804a57b in _start (/home/vagrant/elfutils/src/stack+0x804a57b)

Address 0xf567a000 is located in stack of thread T0 at offset 0 in frame
    #0 0xf786d0ef in dwfl_report_core_segments
/home/vagrant/elfutils/libdwfl/core-file.c:126

  This frame has 1 object(s):
    [32, 88) 'phdr_mem' (line 137)
```

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

             reply	other threads:[~2021-12-17 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 10:38 evvers at ya dot ru [this message]
2021-12-20  0:03 ` [Bug libdw/28710] " mark at klomp dot org
2021-12-20 20:44 ` evvers at ya dot ru
2021-12-21 11:14 ` mark at klomp dot org

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=bug-28710-10460@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.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).