Monday, October 31, 2022

Today we are publishing updated packages for ClamAV 0.103.7, 0.104.4, and 0.105.1.

Why we updated the installer packages

The ClamAV RPM, DEB, PKG, MSI and ZIP installer packages come with all library dependencies bundled. The updated installer packages resolve the following CVE's:

  • CVE-2022-37434 - A critical severity vulnerability in the zlib library.
  • CVE-2022-40303 - A high severity vulnerability in the libxml2 library. Note: As of writing, the details of this CVE are not published. However, you can find additional details on other sites.
  • CVE-2022-40304 - A high severity vulnerability in the libxml2 library. Note: As of writing, the details of this CVE are not published. However, you can find additional details on other sites.

Why we updated the 0.105.1 source package

Starting with ClamAV 0.105.1, some of the ClamAV project is written in Rust and depends on Rust libraries. To make it possible for our users to build ClamAV offline, we bundle in the Rust dependencies.

There are no CVEs present for the Rust libraries bundled in the original 0.105.1 package. However, there are several critical bugs in the JPEG and TIFF image processing libraries in the original 0.105.1 source package. The known issues were resolved in image-tiff version 0.7.4 and jpeg-decoder version 0.3.0. The clamav-0.105.1-2.tar.gz source package includes the updated libraries.

Linux/Unix package maintainers are encouraged to publish new revisions of their own packages for ClamAV 0.105.1 to get these fixes. Anyone who built ClamAV from the original clamav-0.105.1.tar.gz source package is encouraged to reinstall from the newer source package.


Where to find the updated packages

The new packages have a -2 suffix to indicate the package revision. For example, clamav-0.105.1-2.macos.universal.pkg is the updated package replacing clamav-0.105.1.macos.universal.pkg.

As always, you can get the updated packages from the ClamAV.net Downloads page. The original packages have been hidden on the web page and replaced by the updated packages. If you need the originals, the URLs to download them still work.


What about the Docker images

The official ClamAV docker image has been updated to patch the zlib and libxml2 vulnerabilities. The following tags have been updated to point to the new images:

  • clamav/clamav:latest
  • clamav/clamav:latest_base
  • clamav/clamav:stable
  • clamav/clamav:stable_base
  • clamav/clamav:0.105
  • clamav/clamav:0.105_base
  • clamav/clamav:0.105.1
  • clamav/clamav:0.105.1_base

Be sure to use docker pull to get the latest version of the image. For example:

docker pull clamav/clamav:0.105_base

Tuesday, October 25, 2022



We are excited to announce the ClamAV 1.0.0 release candidate!

You may find the source code and installers for this release on:

Note: If you are looking for the source code on clamav.net/downloads - there is an issue preventing the "Source" section from showing for release candidates. Until we fix this issue, you find it under the "Linux" section. 

Tip: If you are downloading the source from the GitHub release page, the package labeled "clamav-1.0.0-rc.tar.gz" does not require an internet connection to build.  All dependencies are included in this package.  But if you download the ZIP or TAR.GZ generated by GitHub, located at the very bottom, then an internet connection will be required during the build to download additional Rust dependencies.

For Docker users, there is no specific Docker tag for the release candidate, but you can use the clamav:unstable or clamav:unstable_base tags.

The release candidate phase is expected to last two to three weeks before we publish the stable release or a second release candidate. Please take this time to evaluate ClamAV 1.0.0.  

Please help us validate this release by providing feedback via the ClamAV mailing list or on our Discord.

ClamAV 1.0.0 includes the following improvements and changes.

Major changes

  • Support for decrypting read-only OLE2-based XLS files that are encrypted with the default "VelvetSweatshop" password. Use of the VelvetSweatshop password will now appear in the metadata JSON.

  • Overhauled the implementation of the all-match feature. The newer code is more reliable and easier to maintain.

    • This project fixed several known issues with signature detection in all- match mode:
      • Enabled embedded file-type-recognition-signatures to match when a malware signature also matched in a scan of the same layer.
      • Enabled bytecode signatures to run in all-match mode after a match has occurred.
      • Fixed an assortment of all-match edge case issues:
    • Added multiple test cases to verify correct all-match behavior.
    • GitHub pull request: https://github.com/Cisco-Talos/clamav/pull/687
  • Added a new callback to the public API for inspecting file content during a scan at each layer of archive extraction.

    • The new callback function type is clcb_file_inspection defined in clamav.h.
    • The function cl_engine_set_clcb_file_inspection() may be used to enable the callback prior to performing a scan.
    • This new callback is to be considered unstable for the 1.0 release. We may alter this function in a subsequent feature version.
    • GitHub pull request: https://github.com/Cisco-Talos/clamav/pull/170
  • Added a new function to the public API for unpacking CVD signature archives.

    • The new function is cl_cvdunpack(). The last parameter for the function may be set to verify if a CVD's signature is valid before unpacking the CVD content to the destination directory.
    • GitHub pull request: https://github.com/Cisco-Talos/clamav/pull/690

Other improvements

  • Add checks to limit PDF object extraction recursion.

  • Increased the limit for memory allocations based on untrusted input and altered the warning message when the limit is exceeded so that it is more helpful and less dramatic.

  • Dramatically improved the build time of libclamav-Rust unit tests. The unit test build is included in the time limit for the test itself and was timing out on slower systems. The ClamAV Rust code modules now share the same build directory, which also reduces the amount of disk space used for the build.

  • Windows: The debugging symbol (PDB) files are now installed alongside the DLL

  • and LIB library files when built in "RelWithDebInfo" or "Debug" mode.

  • Relaxed the constraints on the check for overlapping ZIP file entries so as not to alert on slightly malformed, but non-malicious, Java (JAR) archives.

  • Increased the time limit in FreshClam before warning if the DNS entry is stale. In combination with changes to update the DNS entry more frequently, this should prevent false alarms of failures in the database publication system.

  • Docker: The C library header files are now included in the Docker image. Patch courtesy of GitHub user TerminalFi.

  • Show the BYTECODE_RUNTIME build options when using the ccmake GUI for CMake. Patch courtesy of Дилян Палаузов.

  • Added explicit minimum and maximum supported LLVM versions so that the build will fail if you try to build with the version that is too old or too new and will print a helpful message rather than simply failing to compile because of compatibility issues. Patch courtesy of Matt Jolly.

Bug fixes

Acknowledgments

Special thanks to the following people for code contributions and bug reports:

  • Ben Bodenmiller
  • Дилян Палаузов
  • Liam Jarvis
  • Matt Jolly
  • monkz
  • teoberi
  • TerminalFi

Tuesday, July 26, 2022

Today, we are releasing the following critical patch versions:

  • 0.103.7
  • 0.104.4
  • 0.105.1

As a friendly reminder, 0.104.4 will be the last patch version for the 0.104 feature release per the ClamAV End-of-Life Policy. The 0.103 Long Term Support release will continue to receive patch versions until September 2023.

The release files are available for download on ClamAV.net or through Docker Hub.

Friday, July 1, 2022

ClamAV is releasing an update today that completely overhauls the ClamAV Bytecode Compiler (ClamBC-Compiler). 

A bytecode signature is a form of cross-platform ClamAV plugin. They are distributed and loaded alongside the other ClamAV databases. These signatures are executed as supplemental parsers for specific files, or are triggered by traditional ClamAV signature matches to provide advanced analysis before providing a scan verdict. These serve as a mechanism for writing advanced detection rules and executable unpackers without having to wait to integrate and publish the logic in a full ClamAV feature release. And, more importantly, that means such features can be rapidly upgraded or disabled should a problem arise, without the need to publish a ClamAV critical patch version. They provide an option for the Cisco Talos Malware Research Team to deliver malware detection capabilities that would not otherwise be possible with ClamAV's content-match, hash, and file metadata-based signatures. 

This release, version 0.105.0, mirrors that of the latest ClamAV release. ClamBC-Compiler 0.105.0 carries the source code headers from ClamAV 0.105.0 necessary to build bytecode signatures with all the latest features and fixes found in in ClamAV 0.105.0 and prior.  

But the real milestone here is a celebration of a major ClamBC-Compiler architecture change. In prior versions, the compiler project vendored a sizeable portion of the LLVM project source code, modified so it can build ClamAV bytecode signatures from C (-ish) source. As the LLVM project rapidly evolved, this design made it more difficult to upgrade the ClamBC-Compiler project. Now, ClamBC-Compiler sports a new command-line interface and leverages OS distribution-provided LLVM libraries and the Clang compiler alongside our custom compiler modules. 

This upgrade also includes several improvements to ClamBC-Compiler code quality, quality assurance tests, and test infrastructure. We also fixed a handful of existing compiler bugs.  

ClamBC-Compiler is available as source code on GitHub.com/Cisco-Talos/clamav-bytecode-compiler and as a ready-to-go container on Docker Hub under clamav/clambc-compiler. We look forward to leveraging this new release to deliver new and improved malware detection content.

 

ClamBC-Compiler 0.105.0 Release Notes 

➕ Complete overhaul of the bytecode compiler project. 

  • The clamav compiler passes now build against a system-installed LLVM library. This builds a single shared library (i.e., libclambcc.so).  
  • The compiler application is now a Python script that uses Clang with the bytecode compiler library to run the compiler passes. 

🐛 Fixed bug causing signatures with malloc to fail to run when using system installed LLVM. 

🐛 Fixed the peinfo.c example bytecode source. 

❌ Removed vendored/modified LLVM/Clang 2.7-ish source. 

🌌 Upgraded build system from Autotools to CMake. 

🌌 New Requirements:  

  • LLVM 8  
  • Clang 8  
  • Python 3.6+ 

➕ Support for compiling bytecode signatures from multiple source file. 

🐛 Many assorted bug fixes.