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 2167 freshclam cld incremental update #740

Conversation

micahsnyder
Copy link
Contributor

  • Freshclam: fix incremental update on CLD database

    When adding the cl_cvdunpack() API that (optionally) verifies the
    database signature, we used it in libfreshclam in a place where it may
    also unpack CLD database archives. CLD's may not be verified, because
    the signature information is no longer valid after incremental update.

    This commit fixes the issue by only verifying the unpack if the file is
    a CVD and not a CLD.

  • Test: Add test for incremental update twice in a row

    This is a regression test to ensure that freshclam can update from a CVD
    to a CLD, and then update from the CLD to a (newer) CLD.

Fixes #736

This is a regression test to ensure that freshclam can update from a CVD
to a CLD, and then update from the CLD to a (newer) CLD.
When adding the `cl_cvdunpack()` API that (optionally) verifies the
database signature, we used it in libfreshclam in a place where it may
also unpack CLD database archives. CLD's may not be verified, because
the signature information is no longer valid after incremental update.

This commit fixes the issue by only verifying the unpack if the file is
a CVD and not a CLD.
Copy link
Contributor

@m-sola m-sola left a comment

Choose a reason for hiding this comment

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

Code and test look good. Manually verified that freshclam runs as expected.

Copy link

@andrew-aitchison andrew-aitchison left a comment

Choose a reason for hiding this comment

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

b106df looks good and passes my tests.

@micahsnyder micahsnyder merged commit 542baf6 into Cisco-Talos:main Nov 4, 2022
23 of 24 checks passed
@micahsnyder micahsnyder deleted the CLAM-2167-freshclam-cld-incremental-update branch November 4, 2022 22:47
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.

1.0.0-rc: Freshclam fails download database files
3 participants