Skip to content

DTD hot fix remove use after free pointer vulnerability. These pointer are not used so can be deleted - #46

Open
johnjamesmccann wants to merge 5 commits into
apache:masterfrom
johnjamesmccann:master
Open

johnjamesmccann wants to merge 5 commits into
apache:masterfrom
johnjamesmccann:master

Conversation

@johnjamesmccann

Copy link
Copy Markdown

SPDX-FileCopyrightText: Portions Copyright 2021 Siemens
Modified on 15-Jul-2021 by Siemens and/or its affiliates to fix CVE-2018-1311: Apache Xerces-C use-after-free vulnerability scanning external DTD. Copyright 2021 Siemens.

SPDX-FileCopyrightText: Portions Copyright 2021 Siemens 
Modified on 15-Jul-2021 by Siemens and/or its affiliates to fix CVE-2018-1311: Apache Xerces-C use-after-free vulnerability scanning external DTD. Copyright 2021 Siemens.
@rleigh-codelibre

Copy link
Copy Markdown
Contributor

@johnjamesmccann Thanks for opening this PR. The changes appear as an addition of two new files at the toplevel, rather than as a change to the original files. Please could you update this to add the changes in the correct directory so that the original files are updated? Thanks.

@johnjamesmccann

johnjamesmccann commented Jan 21, 2022 via email

Copy link
Copy Markdown
Author

@johnjamesmccann

Copy link
Copy Markdown
Author

Ok I think I have managed to change the files now by editing them on the PR file list.

Please let me know if you need anything else Roger

John

@rleigh-codelibre

Copy link
Copy Markdown
Contributor

@johnjamesmccann Thanks John, it now looks fine.

Would it be possible to edit the PR description and add a short comment to explain why removing the use of the Janitor prevents the double-free, so that it's documented for the record.

Thanks again,
Roger

@rleigh-codelibre

Copy link
Copy Markdown
Contributor

There is also a unit test failure, which needs investigation. If there isn't a logic error in the PR, the corresponding unit tests might need updating to match.

33: Test command: /usr/local/cmake-3.12.4/bin/cmake "-DNAME=MemHandlerTest1" "-DPROGRAM=/home/travis/build/apache/xerces-c/cmake-build/tests/MemHandlerTest" "-DARGS=-v=always;-n;-r=2;personal.xml" "-DLIBXERCES_C=/home/travis/build/apache/xerces-c/cmake-build/src/libxerces-c-4.0.so" "-DWORKDIR=/home/travis/build/apache/xerces-c/samples/data" "-DSTDIN=" "-DEXPECT_FAIL=FALSE" "-DOBSERVED_DIR=/home/travis/build/apache/xerces-c/cmake-build/tests/observed" "-DEXPECTED_DIR=/home/travis/build/apache/xerces-c/tests/expected" "-DDIFF=/usr/bin/diff" "-DNLS_HOME=/home/travis/build/apache/xerces-c/cmake-build/src" "-P" "/home/travis/build/apache/xerces-c/cmake/RunTest.cmake"
33: Test timeout computed to be: 10000000
33: -- Running /home/travis/build/apache/xerces-c/cmake-build/tests/MemHandlerTest -v=always -n -r=2 personal.xml
33: --- /home/travis/build/apache/xerces-c/cmake-build/tests/observed/MemHandlerTest1-exp.log	2022-01-21 15:42:13.453749473 +0000
33: +++ /home/travis/build/apache/xerces-c/cmake-build/tests/observed/MemHandlerTest1.log	2022-01-21 15:42:13.449749191 +0000
33: @@ -1,4 +1,4 @@
33: -At destruction, domBuilderMemMonitor has 0 bytes.
33: -At destruction, sax2MemMonitor has 0 bytes.
33: -At destruction, sax1MemMonitor has 0 bytes.
33: +At destruction, domBuilderMemMonitor has 276 bytes.
33: +At destruction, sax2MemMonitor has 276 bytes.
33: +At destruction, sax1MemMonitor has 276 bytes.
33:  At destruction, staticMemMonitor has 0 bytes.
33: CMake Error at /home/travis/build/apache/xerces-c/cmake/RunTest.cmake:71 (message):
33:   Observed output does not match expected output
33: Call Stack (most recent call first):
33:   /home/travis/build/apache/xerces-c/cmake/RunTest.cmake:88 (test_command)
33: 
33: 
33/79 Test #33: MemHandlerTest1 ..................***Failed    0.02 sec