Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

johnjamesmccann
Copy link

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
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
Copy link
Author

johnjamesmccann commented Jan 21, 2022 via email

@johnjamesmccann
Copy link
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
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
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

@rleigh-codelibre
Copy link
Contributor

@rouault Did this problem surface with any of your recent work identifying memory bugs? Do you have any thoughts on the change being proposed and the test failure?

@rouault
Copy link
Contributor

rouault commented Jan 23, 2022

@rouault Did this problem surface with any of your recent work identifying memory bugs? Do you have any thoughts on the change being proposed and the test failure?

No, I'm not familiar with that part of the code. I've substantially enhanced this PR in #47.

@johnjamesmccann
Copy link
Author

johnjamesmccann commented Jan 24, 2022 via email

@johnjamesmccann johnjamesmccann changed the title DTD hot fix DTD hot fix remove use after free pointer vulnerability. These pointer are not used so can be deleted Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants