From: "probefuzzer at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug general/22892] New: heap-buffer-overflow in check_group function (src/elflint.c)
Date: Sun, 25 Feb 2018 23:18:00 -0000 [thread overview]
Message-ID: <bug-22892-10460@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=22892
Bug ID: 22892
Summary: heap-buffer-overflow in check_group function
(src/elflint.c)
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: general
Assignee: unassigned at sourceware dot org
Reporter: probefuzzer at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 10851
--> https://sourceware.org/bugzilla/attachment.cgi?id=10851&action=edit
poc
On latest version (0.170) and master branch of elfutils:
there is a heap-buffer-buffer overflow in check_group function of src/elflint.c
file, which could be triggered by the poc below.
This issue is caused by a invalid access in elflint.c:2719. Note that this
issue is different from Bug 21320, which is already fixed in version 0.169.
To reproduce the issue, run: ./eu-elflint -d $POC
==128199==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x612000000140 at pc 0x000000420193 bp 0x7ffe6213d5a0 sp 0x7ffe6213d598
READ of size 4 at 0x612000000140 thread T0
#0 0x420192 in check_group
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:2719
#1 0x4359f1 in check_sections
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:4176
#2 0x43e086 in process_elf_file
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:4740
#3 0x43e086 in process_file
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:243
#4 0x403241 in main
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:176
#5 0x7f5f40d47c04 in __libc_start_main (/lib64/libc.so.6+0x21c04)
#6 0x404263
(/home/tmp/folder/product/elfutils/master/exe_asan/bin/eu-elflint+0x404263)
0x612000000141 is located 0 bytes to the right of 257-byte region
[0x612000000040,0x612000000141)
allocated by thread T0 here:
#0 0x7f5f416773b0 in __interceptor_malloc
../../../../gcc5-src/libsanitizer/asan/asan_malloc_linux.cc:86
#1 0x7f5f4113bedc in convert_data
/u/tmp/folder/product/elfutils/master/src/libelf/elf_getdata.c:166
#2 0x7f5f4113bedc in __libelf_set_data_list_rdlock
/u/tmp/folder/product/elfutils/master/src/libelf/elf_getdata.c:434
SUMMARY: AddressSanitizer: heap-buffer-overflow
/u/tmp/folder/product/elfutils/master/src/src/elflint.c:2719 in check_group
Shadow bytes around the buggy address:
0x0c247fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c247fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c247fff8020: 00 00 00 00 00 00 00 00[01]fa fa fa fa fa fa fa
0x0c247fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==128199==ABORTING
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2018-02-25 23:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-25 23:18 probefuzzer at gmail dot com [this message]
2018-02-26 22:28 ` [Bug general/22892] " mark at klomp dot org
2018-03-05 13:08 ` 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-22892-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).