Bug 1646477 (CVE-2018-18520)

Summary: CVE-2018-18520 elfutils: eu-size cannot handle recursive ar files
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, dbaker, drepper, fche, jakub, jokerman, kanderso, mcermak, me, mjw, mjw, mnewsome, ohudlick, sthangav, trankin
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:20:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1646478, 1646479, 1651198, 1651199, 1651200    
Bug Blocks: 1646485    

Description Laura Pardo 2018-11-05 15:29:14 UTC
A flaw was found in elfutils through v0.174. An Invalid Memory Address Dereference exists in the function elf_end in libelf. Although eu-size is intended to support ar files inside ar files, handle_ar in size.c closes the outer ar file before handling all inner entries. The vulnerability allows attackers to cause a denial of service (application crash) with a crafted ELF file. 


References:
https://sourceware.org/bugzilla/show_bug.cgi?id=23787 
https://sourceware.org/ml/elfutils-devel/2018-q4/msg00057.html

Upstream Patch:
https://sourceware.org/git/?p=elfutils.git;a=commit;h=22d2d082d57a7470fadc0eae67179553f4919209

Comment 1 Laura Pardo 2018-11-05 15:29:57 UTC
Created elfutils tracking bugs for this issue:

Affects: fedora-all [bug 1646478]

Comment 3 Mark Wielaard 2018-11-05 16:10:16 UTC
The title of this CVE is very misleading. A correct description would be "eu-size cannot handle recursive ar files". This has nothing to do with a bug in libelf or elf_end. It is just that eu-size calls elf_end () in the wrong order when seeing an ar file containing an ar file itself.

Comment 5 Stefan Cornelius 2018-11-19 12:07:44 UTC
Statement:

This issue affects the versions of elfutils as shipped with Red Hat Enterprise Linux 5, 6, and 7.

Red Hat Enterprise Linux 5 is now in Extended Life Phase of the support and maintenance life cycle. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

Red Hat Enterprise Linux 6 is now in Maintenance Support 2 Phase of the support and maintenance life cycle. This has been rated as having a security impact of Low, and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

Comment 7 errata-xmlrpc 2019-08-06 12:27:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2197 https://access.redhat.com/errata/RHSA-2019:2197

Comment 8 Product Security DevOps Team 2019-08-06 13:20:33 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2018-18520