Hi,

It seems likely that this issue won't get a proper fix soon, due to upstream inactivity in that area, and the requirement of breaking binary compatibility.

Use-after-free is a serious vulnerability as it can lead to various issues including code execution, and the issue was rated 8.1/10 by NVD:
http://cwe.mitre.org/data/definitions/416.html
https://nvd.nist.gov/vuln/detail/CVE-2018-1311

RedHat introduced a trade-off with the simple attached patch which fixes this issue at the expense of a memory leak. (you can also get it from http://vault.centos.org/7.7.1908/updates/Source/SPackages/xerces-c-3.1.1-10.el7_7.src.rpm)

Do we want to follow suit?

Cheers!
Sylvain Beucler
Debian LTS Team

On Thu, 26 Dec 2019 21:40:38 +0100 Salvatore Bonaccorso <car...@debian.org> wrote:
Source: xerces-c
Version: 3.2.2+debian-1
Severity: important
Tags: security upstream
Forwarded: https://issues.apache.org/jira/browse/XERCESC-2188
Control: found -1 3.1.4+debian-2+deb9u1
Control: found -1 3.1.4+debian-1

Hi,

The following vulnerability was published for xerces-c. There is no
upstream fix and only suggested mitigations, at time of writing the
bugreport.

CVE-2018-1311[0]:
| The Apache Xerces-C 3.0.0 to 3.2.2 XML parser contains a use-after-
| free error triggered during the scanning of external DTDs. This flaw
| has not been addressed in the maintained version of the library and
| has no current mitigation other than to disable DTD processing. This
| can be accomplished via the DOM using a standard parser feature, or
| via SAX using the XERCES_DISABLE_DTD environment variable.


If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2018-1311
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1311
[1] https://issues.apache.org/jira/browse/XERCESC-2188
[2] https://xerces.apache.org/xerces-c/secadv/CVE-2018-1311.txt
[3] https://marc.info/?l=xerces-c-users&m=157653840106914&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-1311

--- xerces-c-3.0.1/src/xercesc/internal/IGXMLScanner.cpp.cve1311
+++ xerces-c-3.0.1/src/xercesc/internal/IGXMLScanner.cpp
@@ -1533,7 +1533,6 @@
             DTDEntityDecl* declDTD = new (fMemoryManager) DTDEntityDecl(gDTDStr, false, fMemoryManager);
             declDTD->setSystemId(sysId);
             declDTD->setIsExternal(true);
-            Janitor<DTDEntityDecl> janDecl(declDTD);
 
             // Mark this one as a throw at end
             reader->setThrowAtEnd(true);
@@ -3154,7 +3153,6 @@
     DTDEntityDecl* declDTD = new (fMemoryManager) DTDEntityDecl(gDTDStr, false, fMemoryManager);
     declDTD->setSystemId(src.getSystemId());
     declDTD->setIsExternal(true);
-    Janitor<DTDEntityDecl> janDecl(declDTD);
 
     // Mark this one as a throw at end
     newReader->setThrowAtEnd(true);

Reply via email to