bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/24247] New: readelf: heap buffer overflow in unw_decode_p2


From: spinpx at gmail dot com
Subject: [Bug binutils/24247] New: readelf: heap buffer overflow in unw_decode_p2_p5
Date: Wed, 20 Feb 2019 08:40:31 +0000

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

            Bug ID: 24247
           Summary: readelf: heap buffer overflow in unw_decode_p2_p5
           Product: binutils
           Version: 2.33 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: spinpx at gmail dot com
  Target Milestone: ---

Created attachment 11627
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11627&action=edit
Heap buffer overflow input

- Intel Xeon Gold 5118 processors and 256 GB memory
- Linux n18-065-139 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64
GNU/Linux
- clang version 4.0.0 (tags/RELEASE_400/final)
- version: commit c72e75a64030b0f6535a80481f37968ad55c333a (Feb 19 2019)
- run: readelf -a input_file


...
       
P5:frgr_mem(grmask=[r4,r5,r7],frmask=[f2,f5,f16,f17,f19,f20,f23,f24,f25,f27,f28,f31])
       
P5:frgr_mem(grmask=[r4,r5,r7],frmask=[f2,f5,f16,f17,f19,f20,f23,f24,f25,f27,f28,f31])
       
P5:frgr_mem(grmask=[r4,r5,r7],frmask=[f2,f5,f16,f17,f19,f20,f23,f24,f25,f27,f28,f31])
       
P5:frgr_mem(grmask=[r4,r5,r7],frmask=[f2,f5,f16,f17,f19,=================================================================
==673002==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x61d000001d01 at pc 0x0000005856b7 bp 0x7fffeb4b1650 sp 0x7fffeb4b1648
READ of size 1 at 0x61d000001d01 thread T0
    #0 0x5856b6 in unw_decode_p2_p5
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/unwind-ia64.c:770:15
    #1 0x58430c in unw_decode
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/unwind-ia64.c:1072:10
    #2 0x55fe61 in dump_ia64_unwind
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:7519:7
    #3 0x5533a5 in ia64_process_unwind
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:7814:6
    #4 0x51a1c6 in process_unwind
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:9338:14
    #5 0x505b0d in process_object
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19275:9
    #6 0x4f547d in process_file
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19715:13
    #7 0x4f3ec8 in main
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19774:11
    #8 0x7f0aa0d1209a in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #9 0x41d4b9 in _start
(/mnt/raid/user/chenpeng/FuzzingBench/build/asan/install/bin/readelf+0x41d4b9)

0x61d000001d01 is located 0 bytes to the right of 2177-byte region
[0x61d000001480,0x61d000001d01)
allocated by thread T0 here:
    #0 0x4c41ac in malloc
/scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:66:3
    #1 0x4f179f in get_data
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:426:9
    #2 0x552ff6 in ia64_process_unwind
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:7796:33
    #3 0x51a1c6 in process_unwind
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:9338:14
    #4 0x505b0d in process_object
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19275:9
    #5 0x4f547d in process_file
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19715:13
    #6 0x4f3ec8 in main
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/readelf.c:19774:11
    #7 0x7f0aa0d1209a in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409a)

SUMMARY: AddressSanitizer: heap-buffer-overflow
/mnt/raid/user/chenpeng/FuzzingBench/binutils/binutils-gdb/binutils/unwind-ia64.c:770:15
in unw_decode_p2_p5
Shadow bytes around the buggy address:
  0x0c3a7fff8350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c3a7fff83a0:[01]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff83b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff83c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff83d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff83e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff83f0: 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
==673002==ABORTING

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]