Bug 958612 (CVE-2015-8538) - VUL-1: CVE-2015-8538: libdwarf: a out of bound read bug is found in libdwarf
Summary: VUL-1: CVE-2015-8538: libdwarf: a out of bound read bug is found in libdwarf
Status: RESOLVED FIXED
Alias: CVE-2015-8538
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Normal
Target Milestone: ---
Assignee: Michael Matz
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/159596/
Whiteboard: CVSSv2:RedHat:CVE-2015-8538:1.7:(AV:L...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-10 09:42 UTC by Marcus Meissner
Modified: 2024-05-20 11:30 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
simplereader.zip (212.82 KB, application/zip)
2015-12-10 09:46 UTC, Marcus Meissner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2015-12-10 09:42:38 UTC
CVE-2015-8538

There is a out of bound read in  latest release version dwarf-20151114, and we have tested the other version dwarf-20140805, so we guess the versions which are between these two version will be affected too.
when an odd elf file passed to dwarfdump, it would cause segment fault by invalid memory access.  please see the attachment for the elf file.

=========================================
Details: 
==========================================


if an elf file is passed to dwarfdump, a SIGSEGV will occur in libdwarf/dwarf_leb.c. 
please see attachment for the elf file.


when debugging it with gdb, the error information as follows:

--------------------------------
Program received signal SIGSEGV, Segmentation fault.
_dwarf_decode_u_leb128 (leb128=leb128@entry=0x80006a5be7a4 <error: Cannot access memory at address 0x80006a5be7a4>, leb128_length=leb128_length@entry=0x7fffffffda68) at dwarf_leb.c:57
57          if ((*leb128 & 0x80) == 0) {

(gdb) bt
#0  _dwarf_decode_u_leb128 (leb128=leb128@entry=0x80006a5be7a4 <error: Cannot access memory at address 0x80006a5be7a4>, leb128_length=leb128_length@entry=0x7fffffffda68) at dwarf_leb.c:57
#1  0x00000000004319fb in dwarf_attrlist (die=die@entry=0x6bb850, attrbuf=attrbuf@entry=0x7fffffffdb18, attrcnt=attrcnt@entry=0x7fffffffdb10, error=0x67c298 <err>) at dwarf_query.c:246
#2  0x0000000000410909 in print_one_die (dbg=dbg@entry=0x67ef00, die=die@entry=0x6bb850, print_information=1, die_indent_level=1, srcfiles=srcfiles@entry=0x0, cnt=cnt@entry=0, ignore_die_stack=ignore_die_stack@entry=0) at print_die.c:1211
#3  0x00000000004111d8 in print_die_and_children_internal (dbg=dbg@entry=0x67ef00, in_die_in=0x6a4a30, is_info=is_info@entry=1, srcfiles=srcfiles@entry=0x0, cnt=cnt@entry=0) at print_die.c:896
#4  0x00000000004115e5 in print_die_and_children_internal (dbg=dbg@entry=0x67ef00, in_die_in=0x6811a0, is_info=is_info@entry=1, srcfiles=0x0, cnt=0) at print_die.c:990
#5  0x0000000000411d1f in print_die_and_children (cnt=<optimized out>, srcfiles=<optimized out>, is_info=1, in_die_in=<optimized out>, dbg=0x67ef00) at print_die.c:778
#6  print_one_die_section (dbg=0x67ef00, is_info=is_info@entry=1) at print_die.c:725
#7  0x00000000004126a3 in print_infos (dbg=<optimized out>, is_info=is_info@entry=1) at print_die.c:319
#8  0x000000000040217a in process_one_file (config_file_data=0x6660c0 <config_file_data>, archive=0, tied_file_name=0x0, file_name=0x67d110 "./simplereader.elf", elftied=0x0, elf=<optimized out>) at dwarfdump.c:1280
#9  main (argc=<optimized out>, argv=<optimized out>) at dwarfdump.c:630



References:
https://bugzilla.redhat.com/show_bug.cgi?id=1289385
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8538
http://seclists.org/oss-sec/2015/q4/464
Comment 1 Marcus Meissner 2015-12-10 09:46:24 UTC
Created attachment 658937 [details]
simplereader.zip

QA REPRODUCER:

ELF inside zip

dwarfdump simplereader.elf

will segfault

(dwarfdump can be gotten from SUSE:SLE-11:GA libdwarf subpackage,

osci getbinaries SUSE:SLE-11:GA libdwarf standard x86_64
)
Comment 3 Swamp Workflow Management 2015-12-10 23:01:24 UTC
bugbot adjusting priority