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

Fix infinite loop when scanning some DMG archives #1000

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

micahsnyder
Copy link
Contributor

Note: this was already reviewed internally and included in:

This PR is just to fix it in main now towards 1.2.0.


When decompressing a zlib stream, it's possible to reach end of stream before running out of available bytes. In the DMG parser, this may cause an infinite loop.

This commit adds a check for the condition where stream has ended before running out of input.

Fixes: #925

When decompressing a zlib stream, it's possible to reach end of stream
before running out of available bytes. In the DMG parser, this may cause
an infinite loop.

This commit adds a check for the condition where stream has ended before
running out of input.

Fixes: Cisco-Talos#925
@micahsnyder micahsnyder merged commit 8e23170 into Cisco-Talos:main Aug 18, 2023
22 of 23 checks passed
@micahsnyder micahsnyder deleted the CLAM-2355-DMG-loop branch August 18, 2023 20:39
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.

ClamAV 1.1.0/26894 Runs Forever
1 participant