public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "wcventure at 126 dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug general/23542] New: heap-buffer-overflow in /elfutils/src/elflint.c:2055 check_sysv_hash
Date: Fri, 17 Aug 2018 04:11:00 -0000	[thread overview]
Message-ID: <bug-23542-10460@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 23542
           Summary: heap-buffer-overflow in /elfutils/src/elflint.c:2055
                    check_sysv_hash
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: wcventure at 126 dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 11190
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11190&action=edit
./eu-elflint --strict @@

==123497==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x61300000dfd4 at pc 0x000000432311 bp 0x7ffc0e4d29c0 sp 0x7ffc0e4d29b0
READ of size 4 at 0x61300000dfd4 thread T0
    #0 0x432310 in check_sysv_hash
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:2055
    #1 0x432310 in check_hash
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:2355
    #2 0x439613 in check_sections
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:4161
    #3 0x440395 in process_elf_file
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:4739
    #4 0x440395 in process_file
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:242
    #5 0x402e55 in main
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:175
    #6 0x7f81b5bba82f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x403b08 in _start
(/home/wcventure/Documents/Cproject/elfutils/build/bin/eu-elflint+0x403b08)

0x61300000dfd5 is located 0 bytes to the right of 341-byte region
[0x61300000de80,0x61300000dfd5)
allocated by thread T0 here:
    #0 0x7f81b64a4602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7f81b61babff in convert_data
/home/wcventure/Documents/Cproject/elfutils/libelf/elf_getdata.c:164
    #2 0x7f81b61babff in __libelf_set_data_list_rdlock
/home/wcventure/Documents/Cproject/elfutils/libelf/elf_getdata.c:431

SUMMARY: AddressSanitizer: heap-buffer-overflow
/home/wcventure/Documents/Cproject/elfutils/src/elflint.c:2055 check_sysv_hash
Shadow bytes around the buggy address:
  0x0c267fff9ba0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c267fff9bb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c267fff9bc0: fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c267fff9bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c267fff9be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c267fff9bf0: 00 00 00 00 00 00 00 00 00 00[05]fa fa fa fa fa
  0x0c267fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c267fff9c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c267fff9c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c267fff9c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c267fff9c40: 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
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  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
==123497==ABORTING

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

             reply	other threads:[~2018-08-17  4:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17  4:11 wcventure at 126 dot com [this message]
2018-08-17 20:19 ` [Bug general/23542] " mark at klomp dot org
2018-08-18 20:50 ` 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-23542-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).