Bug 1664700 (CVE-2018-20623)

Summary: CVE-2018-20623 binutils: Use-after-free in the error function
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, dbaker, erik-fedora, fweimer, jokerman, kanderso, klember, mcermak, mnewsome, mpolacek, nickc, ohudlick, rjones, sthangav, trankin, virt-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:21:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1664713, 1664714, 1664715, 1668405, 1668406, 1668407    
Bug Blocks: 1664716    

Description Andrej Nemec 2019-01-09 13:36:06 UTC
A use-after-free issues was found in the error function of binutils. A local attacker could use this for a denial of service.

Upstream issue:


Comment 1 Andrej Nemec 2019-01-09 13:48:13 UTC
Created binutils tracking bugs for this issue:

Affects: fedora-all [bug 1664713]

Created mingw-binutils tracking bugs for this issue:

Affects: epel-all [bug 1664715]
Affects: fedora-all [bug 1664714]

Comment 3 Riccardo Schirone 2019-01-22 16:30:35 UTC
Function readelf.c:process_archive() uses filedata->file_name when printing errors, however until the file_name field is not properly initialized, it should not be accessed, otherwise it would access memory that is freed at the previous iteration.

Comment 5 Riccardo Schirone 2019-01-22 16:45:38 UTC
The flaw was introduced with commit https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=dda8d76d0dd2b07df769f6cae20aff483468b342, thus RHEL 5, 6, 7 and Red Hat Developer Toolset 7 are not affected by this flaw.

Comment 7 Riccardo Schirone 2019-01-23 08:47:35 UTC

This issue did not affect the versions of binutils as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they did not include the vulnerable code, which was introduced in a newer version of the package.