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 2612 Fix DatabaseCustomURL CVD prune bug, and add 'valhalla' optional database #1233

Merged
merged 2 commits into from
Apr 14, 2024

Conversation

micahsnyder
Copy link
Contributor

  • Freshclam: fix issue DatabaseCustomURL CVD prune issue

    If using DatabaseCustomURL to download a CVD that Freshclam doesn't know about, i.e. one that is not in the hardcoded standard or optional database lists in freshclam.c, Freshclam will prune the database and then re-download it.

    This change makes it so we look for URL's with ".cvd" at the end and then take those into consideration when checking which CVD's (or CLD's) should be pruned.

    Note that I didn't change the interface to fc_prune_database_directory(). That would have been cleaner, but would've changed the public API and I want to backport this fix.

  • Add 'valhalla' to Freshclam's list of optional CVD's

@micahsnyder micahsnyder added the 🍒cherry-pick-candidate A PR that should be backported once approved. label Apr 12, 2024
freshclam/freshclam.c Outdated Show resolved Hide resolved
freshclam/freshclam.c Outdated Show resolved Hide resolved
@ragusaa
Copy link
Contributor

ragusaa commented Apr 12, 2024

Testing passed

@micahsnyder
Copy link
Contributor Author

Oops. There's a windows build issue:

freshclam.c.obj : error LNK2019: unresolved external symbol strndup referenced in function perform_database_update

I'll fix it.

If using DatabaseCustomURL to download a CVD that Freshclam doesn't know
about, i.e. one that is not in the hardcoded standard or optional
database lists in freshclam.c, Freshclam will prune the database and
then re-download it.

This change makes it so we look for URL's with ".cvd" at the end and
then take those into consideration when checking which CVD's (or CLD's)
should be pruned.

Note that I didn't change the interface to
fc_prune_database_directory(). That would have been cleaner, but
would've changed the public API and I want to backport this fix.
@micahsnyder micahsnyder merged commit 07900fb into Cisco-Talos:main Apr 14, 2024
23 of 24 checks passed
@micahsnyder micahsnyder deleted the CLAM-2612-valhalla branch September 1, 2024 17:57
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 8, 2024
0.103.12 (2024-09-04)

ClamAV 0.103.12 is a patch release with the following fixes:

- [CVE-2024-20506](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-20506):
  Changed the logging module to disable following symlinks on Linux and Unix
  systems so as to prevent an attacker with existing access to the 'clamd' or
  'freshclam' services from using a symlink to corrupt system files.

  This issue affects all currently supported versions. It will be fixed in:
  - 1.4.1
  - 1.3.2
  - 1.0.7
  - 0.103.12

  Thank you to Detlef for identifying this issue.

- [CVE-2024-20505](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-20505):
  Fixed a possible out-of-bounds read bug in the PDF file parser that could
  cause a denial-of-service (DoS) condition.

  This issue affects all currently supported versions. It will be fixed in:
  - 1.4.1
  - 1.3.2
  - 1.0.7
  - 0.103.12

  Thank you to OSS-Fuzz for identifying this issue.

- ClamOnAcc: Fixed an infinite loop when a watched directory does not exist.
  - [GitHub pull request](Cisco-Talos/clamav#1198)

- Fixed a bug causing CVDs downloaded by the `DatabaseCustomURL` Freshclam
  config option to be pruned and then re-downloaded with every update.
  Also added the new 'valhalla' database name to the list of optional databases
  in preparation for future work.
  - Backport of [GitHub pull request](Cisco-Talos/clamav#1233)

- Fixed an unaligned pointer dereference issue on select architectures.
  Fix courtesy of Sebastian Andrzej Siewior.
  - Backport of [GitHub pull request](Cisco-Talos/clamav#1293)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒cherry-pick-candidate A PR that should be backported once approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants