First published: Thu Jun 09 2016(Updated: )
It was found that original patch for issues <a href="https://access.redhat.com/security/cve/CVE-2015-1283">CVE-2015-1283</a> and <a href="https://access.redhat.com/security/cve/CVE-2015-2716">CVE-2015-2716</a> used overflow checks that could be optimized out by some compilers applying certain optimization settings, which can cause the vulnerability to remain even after applying the patch. One pattern in the fix for CVE-2015-1283/CVE-2015-2716 is: /* bufferSize is positive here */ do { bufferSize *= 2; } while (bufferSize < neededSize && bufferSize > 0); if (bufferSize <= 0) { errorCode = XML_ERROR_NO_MEMORY; return NULL; Any of the modern optimizing compiler, IF able to infer that bufferSize is initially positive (which is true but not obvious to see through local reasoning), will eliminate bufferSize > 0 as always true when the execution is defined, and bufferSize <= 0 as always false when the execution is defined. Without knowing that bufferSize starts positive, an optimizing compiler could also move the test bufferSize > 0 out of the loop, that is, compile the code as if it had been written: if (bufferSize <= 0) errorCode = XML_ERROR_NO_MEMORY; return NULL; else { do { bufferSize *= 2; } while (bufferSize < neededSize); } Both cases leads to not eliminating the vulnerability. Upstream patch: <a href="https://sourceforge.net/p/expat/code_git/ci/f0bec73b018caa07d3e75ec8dd967f3785d71bde/tree/expat/lib/xmlparse.c?diff=a238d7ea7a715ef3850c4cbdd86aeda7077b6bbc">https://sourceforge.net/p/expat/code_git/ci/f0bec73b018caa07d3e75ec8dd967f3785d71bde/tree/expat/lib/xmlparse.c?diff=a238d7ea7a715ef3850c4cbdd86aeda7077b6bbc</a>
Credit: secalert@redhat.com secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
Libexpat Project Libexpat | <=2.1.1 | |
Canonical Ubuntu Linux | =12.04 | |
McAfee Policy Auditor | <6.5.1 | |
Python Python | >=2.7.0<2.7.15 | |
Python Python | >=3.3.0<3.3.7 | |
Python Python | >=3.4.0<3.4.7 | |
Python Python | >=3.5.0<3.5.4 | |
Python Python | >=3.6.0<3.6.2 | |
debian/expat | 2.2.10-2+deb11u5 2.2.10-2+deb11u6 2.5.0-1 2.5.0-1+deb12u1 2.6.3-2 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2016-4472 refers to a vulnerability in Expat that allows remote attackers to cause a denial of service or possibly execute arbitrary code via crafted XML data.
The severity of CVE-2016-4472 is rated as high with a CVSS score of 8.1.
CVE-2016-4472 affects Expat by removing the overflow protection in certain optimization settings, making it susceptible to crashing or arbitrary code execution.
The affected software versions include xmlrpc-c 1.16.33-3.1ubuntu5.2, libxmltok 1.2-4ubuntu0.18.04.1~, libxmltok 1.2-4ubuntu0.20.04.1~, libxmltok 1.2-3ubuntu0.16.04.1~, libxmltok 1.2-4ubuntu0.22.04.1~, expat 2.2.6-2+deb10u4, expat 2.2.6-2+deb10u6, expat 2.2.10-2+deb11u5, expat 2.5.0-1, and expat 2.5.0-2.
More information about CVE-2016-4472 can be found on the following references: [link1](https://access.redhat.com/security/cve/CVE-2015-1283), [link2](https://access.redhat.com/security/cve/CVE-2015-2716), [link3](https://sourceforge.net/p/expat/code_git/ci/f0bec73b018caa07d3e75ec8dd967f3785d71bde/tree/expat/lib/xmlparse.c?diff=a238d7ea7a715ef3850c4cbdd86aeda7077b6bbc).