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
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]
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.
Statement: This vulnerability exists in the DTD validation functionality of libxml2. Applications that do not attempt to validate untrusted documents are not impacted.
Upstream patch: https://gitlab.gnome.org/GNOME/libxml2/commit/92b9e8c8