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

Clam 1656 Fix leak loading malformed IDB databases #547

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

ragusaa
Copy link
Contributor

@ragusaa ragusaa commented Apr 14, 2022

Free matcher on error condition.

Reproducer artifacts are https://github.com/Cisco-Talos/clamav/suites/4980638814/artifacts/145471677

To reproduce, build with address sanitization enabled and mpool disabled
'cmake -G Ninja .. -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_C_COMPILER=clang-8 -DCMAKE_LINKER=clang-8 -DCMAKE_INSTALL_PREFIX=~/install -DCMAKE_C_FLAGS='''-fsanitize=address -g -fno-omit-frame-pointer''' -DENABLE_TESTS=OFF -DDISABLE_MPOOL=1'

Rename the reproducer test case to '.idb', and try and load the signature
'clamscan -d test.idb'

Description is here https://github.com/Cisco-Talos/clamav/runs/4860615522?check_suite_focus=true
Click Summary->artifacts

@micahsnyder micahsnyder changed the title Free matcher on error condition Clam 1656 Fix leak loading malformed IDB databases May 28, 2022
Copy link
Contributor

@micahsnyder micahsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would've preferred swapping this to a goto done; solution, but this will suffice.

@micahsnyder
Copy link
Contributor

Rebased to see it go through the test pipelines.

@micahsnyder micahsnyder merged commit cdeeb42 into Cisco-Talos:main Jun 1, 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.

2 participants