8.1
CWE
119
Advisory Published
CVE Published
Updated

CVE-2016-4472: Buffer Overflow

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 &lt; neededSize &amp;&amp; bufferSize &gt; 0); if (bufferSize &lt;= 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 &gt; 0 as always true when the execution is defined, and bufferSize &lt;= 0 as always false when the execution is defined. Without knowing that bufferSize starts positive, an optimizing compiler could also move the test bufferSize &gt; 0 out of the loop, that is, compile the code as if it had been written: if (bufferSize &lt;= 0) errorCode = XML_ERROR_NO_MEMORY; return NULL; else { do { bufferSize *= 2; } while (bufferSize &lt; 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 SoftwareAffected VersionHow 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+deb12u1
2.6.4-1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2016-4472?

    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.

  • What is the severity of CVE-2016-4472?

    The severity of CVE-2016-4472 is rated as high with a CVSS score of 8.1.

  • How does CVE-2016-4472 affect Expat?

    CVE-2016-4472 affects Expat by removing the overflow protection in certain optimization settings, making it susceptible to crashing or arbitrary code execution.

  • Which software versions are affected by CVE-2016-4472?

    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.

  • Where can I find more information about CVE-2016-4472?

    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).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203