Bug 1197796 (CVE-2015-2059)

Summary: CVE-2015-2059 libidn: out-of-bounds read with stringprep on invalid UTF-8
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: kdudka, mlichvar, sardella, slawomir
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libidn 1.31 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-13 21:03:55 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: 1197797    
Bug Blocks: 1227389    

Description Martin Prpič 2015-03-02 15:58:56 UTC
An out-of-bounds read flaw was found in libidn, which could potentially allow an attacker to disclose sensitive information from an application using the libidn library.

This flaw was identified along with a flaw in jabberd2 (CVE-2015-2058, bug 1191149). MITRE assigned a separate CVE for libidn with the following reasoning:

"""
> The libidn documentation claims "This function will not read or write to
> characters outside that size." about the length of the buffer that needs to
> be specified, but this is not true,

Use CVE-2015-2059 for this libidn out-of-bounds read issue. Possibly
it could be argued that this is a borderline case for a CVE. However,
the documentation says "This function will not read or write to
characters outside that size" rather than "If the input is valid
UTF-8, then this function will not read or write to characters outside
that size." If the input is not valid UTF-8, then the function is
entitled to undefined behavior within the bounds of the buffer.
"""
[http://seclists.org/oss-sec/2015/q1/672]

Related upstream issue:

https://github.com/jabberd2/jabberd2/issues/85

Comment 1 Martin Prpič 2015-03-02 15:59:51 UTC
Created libidn tracking bugs for this issue:

Affects: fedora-all [bug 1197797]

Comment 2 Martin Prpič 2015-03-02 16:00:40 UTC
Note that this flaw does not affect libidn2 because it does not implement the stringprep function.

Comment 3 Martin Prpič 2015-03-02 16:02:49 UTC
Statement:

This issue affects the versions of libidn as shipped with Red Hat Enterprise Linux 6 and 7. Red Hat Product Security has rated this issue as having Low security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 4 Miroslav Lichvar 2015-05-04 10:01:04 UTC
*** Bug 1215275 has been marked as a duplicate of this bug. ***

Comment 11 Kamil Dudka 2015-07-08 10:18:55 UTC
upstream commit:

http://git.savannah.gnu.org/cgit/libidn.git/commit/?id=2e97c279

Comment 12 Nikos Mavrogiannopoulos 2015-07-13 07:22:48 UTC
Issue was fixed in version 1.31.

Comment 13 Fedora Update System 2015-07-29 01:54:24 UTC
libidn-1.31-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-07-29 01:56:17 UTC
libidn-1.31-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Miroslav Lichvar 2015-08-03 11:08:20 UTC
It seems there was a bug in the new code and it's possible to crash libidn with malformed UTF-8.

http://git.savannah.gnu.org/cgit/libidn.git/commit/?id=58c721ac2dc96bccd737f3f544f3a22a50477bbf
https://lists.gnu.org/archive/html/help-libidn/2015-07/msg00026.html

The new 1.32 release fixes this issue.

Comment 17 Product Security DevOps Team 2021-06-13 21:03:55 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-2015-2059