Bug 1223813 (CVE-2015-4041) - CVE-2015-4041 coreutils: heap buffer overflow in sort(1) keycompare_mb()
Summary: CVE-2015-4041 coreutils: heap buffer overflow in sort(1) keycompare_mb()
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2015-4041
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: 1223821
Blocks: 1223819
TreeView+ depends on / blocked
 
Reported: 2015-05-21 13:25 UTC by Vasyl Kaigorodov
Modified: 2021-02-17 05:15 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-30 13:48:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Vasyl Kaigorodov 2015-05-21 13:25:45 UTC
It was reported that a heap overflow can be triggered in sort(1).
This appears to be caused by performing a size calculation without properly considering the number of bytes occupied by 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:25 UTC
Created coreutils tracking bugs for this issue:

Affects: fedora-all [bug 1223821]

Comment 2 Ondrej Vasik 2015-05-22 08:02:59 UTC
I believe heap buffer overflow affects only older versions of sort i18n patch (IOW only one of CVEs is valid for current Fedora patch, another one is valid only for RHEL 6 and older). LC_ALL=C sort code path is completely unaffected. Do you plan to create RHEL 6/7 bz for this CVE? Actually I think this (and previous similar flaws in i18n patch that got CVE as well) was the primary reason why P.Brady contacted secalert about this issue.

Comment 7 Huzaifa S. Sidhpurwala 2020-02-11 03:34:49 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.


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