Bug 1435182 (CVE-2016-10255) - CVE-2016-10255 elfutils: Memory allocation failure in __libelf_set_rawdata_wrlock (elf_getdata.c)
Summary: CVE-2016-10255 elfutils: Memory allocation failure in __libelf_set_rawdata_wr...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-10255
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-23 10:47 UTC by Andrej Nemec
Modified: 2019-09-29 14:08 UTC (History)
13 users (show)

Fixed In Version: elfutils 0.168
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 10:50:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrej Nemec 2017-03-23 10:47:44 UTC
A vulnerability was found in elfutils. A maliciously crafted ELF file could cause a very large allocation failure.

References:

https://blogs.gentoo.org/ago/2016/11/04/elfutils-memory-allocation-failure-in-__libelf_set_rawdata_wrlock-elf_getdata-c/
http://seclists.org/oss-sec/2016/q4/367

Comment 1 Mark Wielaard 2017-03-23 11:04:35 UTC
(In reply to Andrej Nemec from comment #0)
> A vulnerability was found in elfutils. A maliciously crafted ELF file could
> cause the application to crash.

Note that it real bug wasn't a crash but a possibly very large allocation failure. Normally the application would get E_ELF_NOMEM as error value (except when malloc was overridden as in the fuzzing example). The fix was to make the code first check whether the allocation size made sense and if not return ELF_E_INVALID_SECTION_HEADER early instead of trying to allocate the memory.


Note You need to log in before you can comment on or make changes to this bug.