Bug 1223817 (CVE-2015-4042)

Summary: CVE-2015-4042 coreutils: possible buffer overflow in keycompare_mb()
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: admiller, jrusnack, kdudka, kzak, ooprala, ovasik, pbrady, p, twaugh, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-30 13:49:34 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: 1223821    
Bug Blocks: 1223819    

Description Vasyl Kaigorodov 2015-05-21 13:30:59 UTC
It was reported that there might be a buffer overflow triggered in sort(1)  with data around SIZE_MAX/2.
This appears to be related to the new "SIZE_MAX - lenb - 2 < lena" test, which is not specifically associated with use of multibyte characters.

Initial report: https://bugzilla.suse.com/show_bug.cgi?id=928749
Fix: https://github.com/pixelb/coreutils/commit/bea5e36cc876ed627bb5e0eca36fdfaa6465e940
CVE assignment: http://seclists.org/oss-sec/2015/q2/502

Comment 1 Vasyl Kaigorodov 2015-05-21 13:35:40 UTC
Created coreutils tracking bugs for this issue:

Affects: fedora-all [bug 1223821]

Comment 4 Huzaifa S. Sidhpurwala 2020-02-11 03:34:50 UTC
Mitigation:

This flaw is triggered by using sort on specially crafted malicious data file. When using sort with trusted inputs, this flaw cannot be triggered.