Bug 1462225 (CVE-2017-0663) - CVE-2017-0663 libxml2: Heap buffer overflow in xmlAddID
Summary: CVE-2017-0663 libxml2: Heap buffer overflow in xmlAddID
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2017-0663
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1462226 1462227 1462228 1525811 1695417
Blocks: 1462234
TreeView+ depends on / blocked
 
Reported: 2017-06-16 12:47 UTC by Adam Mariš
Modified: 2023-09-26 13:23 UTC (History)
32 users (show)

Fixed In Version: libxml 2.9.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-30 05:49:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Mariš 2017-06-16 12:47:27 UTC
A heap-based buffer overflow vulnerability in libxml2 in xmlValidateOneNamespace function due to incorrect casting was found.

Upstream bug (private at this moment):

https://bugzilla.gnome.org/show_bug.cgi?id=780228

Oss-fuzz bug report:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=598

Android patch:

https://android.googlesource.com/platform/external/libxml2/+/521b88fbb6d18312923f0df653d045384b500ffc

References:

https://source.android.com/security/bulletin/2017-06-01#libraries

Comment 1 Adam Mariš 2017-06-16 12:49:27 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1462226]


Created mingw-libxml2 tracking bugs for this issue:

Affects: epel-7 [bug 1462227]
Affects: fedora-all [bug 1462228]

Comment 2 Doran Moppert 2017-06-19 02:09:09 UTC
Potential RCE through pointer confusion:  passing an xmlNs* where an xmlAttr* was intended .. xmlNs is a smaller structure with some overlap, so opportunity potentially exists to overwrite some juicy pointers after the end of the structure.

The flaw exists in validation (xmlValidateDtd(), xmlValidateDocument()), so applications that do not attempt to validate untrusted documents are not impacted.

Comment 3 Doran Moppert 2017-06-23 05:19:55 UTC
Statement:

This vulnerability exists in the DTD validation functionality of libxml2.  Applications that do not attempt to validate untrusted documents are not impacted.

Comment 6 Doran Moppert 2019-01-21 00:45:11 UTC
Upstream patch:

https://gitlab.gnome.org/GNOME/libxml2/commit/92b9e8c8


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