From patchwork Thu Dec 1 20:01:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 6271 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4NNRmY05Rxz3whh for ; Thu, 1 Dec 2022 20:01:48 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NNRmW0h0Vz2PK; Thu, 1 Dec 2022 20:01:47 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NNRmV6L1Hz2yNV; Thu, 1 Dec 2022 20:01:46 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4NNRmS5L0Rz2x9j for ; Thu, 1 Dec 2022 20:01:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4NNRmR5Xn7z2NB for ; Thu, 1 Dec 2022 20:01:43 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1669924903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTKlClfkDFRaKORPtTLSzsnpzoeu4pj7ljtk83x2HC8=; b=iEiywxcicRo/sdtvjulnJhhbtWs6rU/WrU+4faehuc/2S/vXk7MGNiqitcJqbkyfmkgGbv uj3r136XQYYtdRBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1669924903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTKlClfkDFRaKORPtTLSzsnpzoeu4pj7ljtk83x2HC8=; b=uCB2dPG2iixb1RBhBzcOh2GS/PTNvrEcJvnoBd9KrJoq7B8xRKiF/zzsFS1numnRGcrKfv GhfrAwt4z1oW9kdhjzdcF7ahJrr79WB68GIXD8PZVDqDpCFcSQZW3W6eR3cXPdCy68kw3B JO4a9+tTvGdv9V2cNYmd1r/w2HD0N2TvAIKOA37wa0SiWcVlOGfG3VqRaxPl6ZgPbDLE2I 24XATeckSDbbO3P89kqsQoc771ahRt0PQqMEUQC0BO/6i0eXXGl0W4CzxQwsaKKmia7/GM WpKn9xJkpQxGZbWk/JsJJ87XpkW7+65GVhGiv72EhJMY96NH0sxMTO1AFc0Nlw== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] clamav: Update to 1.0.0 Date: Thu, 1 Dec 2022 21:01:39 +0100 Message-Id: <20221201200139.3521678-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" [Please note: This 'clamav' version needs rust >1.56] For details see: https://blog.clamav.net/2022/11/clamav-100-lts-released.html Excerpt: "Major changes Support for decrypting read-only OLE2-based XLS files that are encrypted with the default password. Use of the default 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. 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. 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. The option to build with an external TomsFastMath library has been removed. ClamAV requires non-default build options for TomsFastMath to support bigger floating point numbers. Without this change, database and Windows EXE/DLL authenticode certificate validation may fail. The ENABLE_EXTERNAL_TOMSFASTMATH build is now ignored. Moved the Dockerfile and supporting scripts from the main ClamAV repository over to a new repository: https://github.com/Cisco-Talos/clamav-docker The separate repository will make it easier to update the images and fix issues with images for released ClamAV versions. Any users building the ClamAV Docker image rather than pulling them from Docker Hub will have to get the latest Docker files from the new location. Increased the SONAME major version for libclamav because of ABI changes between the 0.103 LTS release and the 1.0 LTS release. 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. For 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 a 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. Fixed compiler warnings that may turn into errors in Clang 16. Patch courtesy of Michael Orlitzky. Allow building with a custom RPATH so that the executables may be moved after build in a development environment to a final installation directory. Bug fixes Assorted code quality fixes. These are not security issues and will not be backported to prior feature versions: Several heap buffer overflows while loading PDB and WDB databases were found by OSS-Fuzz and by Michal Dardas. oss-fuzz 43843: heap buffer overflow read (1) cli_sigopts_handler oss-fuzz 44849: heap buffer overflow read (4) in HTML/js-norm oss-fuzz 43816: heap buffer overflow read (8) in cli_bcomp_freemeta oss-fuzz 43832: heap buffer overflow read (2) in cli_parse_add oss-fuzz 44493: integer overflow in cli_scannulsft CIFuzz leak detected in IDB parser oss-fuzz assorted signature parser leaks oss-fuzz 40601: leak detected in pdf_parseobj Fixed a build failure when using LIBCLAMAV_ONLY mode with tests enabled. Fixed an issue verifying EXE/DLL authenticode signatures to determine a given file can be trusted (skipped). Fixed a caching bug relating to the Container and Intermediates logical signature condition. Fixed a build issue when build with RAR disabled or when building with an external libmspack library rather than the bundled library. Fixed the capitalization of the -W option for clamonacc in the clamonacc manpage. Patch courtesy of GitHub user monkz. macOS: Fixed an issue with memory-map (mmap) system call detection affecting versions 0.105 and 0.104. Memory maps may be used in ClamAV to improve signature load performance and scan performance, as well as RAM usage. Fixed a performance issue with Rust code when the build type is not explicitly set to "Release" or "RelWithDebInfo". The Rust default build type is now "RelWithDebInfo" just like the C code, instead of Debug. This means it is now optimized by default. Fixed an issue loading Yara rules containing regex strings with an escaped forward-slash (\/) followed by a colon (:). Fixed an issue detecting and scanning ZIP file entries appended to very small files. The fix is part of the all-match feature overhaul. Fixed a detection issue with EXE/DLL import-address-table hash signatures that specify a wildcard (*) for the size field. The fix is part of the all-match feature overhaul. Fixed the default bytecode timeout value listed in the manpages and in the sample config files. Patches courtesy of Liam Jarvis and Ben Bodenmiller. Fixed an issue building the libclamav_rust test program when running ctest if building with BYTECODE_RUNTIME=llvm and when the FindLLVM.cmake module is used to find the LLVM libraries. Patch courtesy of GitHub user teoberi. Fixed an issue where scans sent to clamd with the all-match mode enabled caused all subsequent scans to also use all-match mode. Fixed bug when starting clamonacc with the --log=FILE option that created randomly named files in the current directory. Other assorted bug fixes." Signed-off-by: Matthias Fischer --- config/rootfiles/packages/clamav | 12 ++++++------ lfs/clamav | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/config/rootfiles/packages/clamav b/config/rootfiles/packages/clamav index 588c34eb4..fd3c4c0c9 100644 --- a/config/rootfiles/packages/clamav +++ b/config/rootfiles/packages/clamav @@ -13,17 +13,17 @@ usr/bin/sigtool #usr/include/clamav.h #usr/include/libfreshclam.h usr/lib/libclamav.so -usr/lib/libclamav.so.9 -usr/lib/libclamav.so.9.1.0 +usr/lib/libclamav.so.11 +usr/lib/libclamav.so.11.0.0 usr/lib/libclammspack.so usr/lib/libclammspack.so.0 usr/lib/libclammspack.so.0.8.0 usr/lib/libclamunrar.so -usr/lib/libclamunrar.so.9 -usr/lib/libclamunrar.so.9.1.0 +usr/lib/libclamunrar.so.11 +usr/lib/libclamunrar.so.11.0.0 usr/lib/libclamunrar_iface.so -usr/lib/libclamunrar_iface.so.9 -usr/lib/libclamunrar_iface.so.9.1.0 +usr/lib/libclamunrar_iface.so.11 +usr/lib/libclamunrar_iface.so.11.0.0 usr/lib/libfreshclam.so usr/lib/libfreshclam.so.2 usr/lib/libfreshclam.so.2.0.2 diff --git a/lfs/clamav b/lfs/clamav index 1cd15ea27..673ae90f1 100644 --- a/lfs/clamav +++ b/lfs/clamav @@ -26,16 +26,15 @@ include Config SUMMARY = Antivirus Toolkit -VER = 0.105.1 -SUBVER = -2 +VER = 1.0.0 THISAPP = clamav-$(VER) -DL_FILE = $(THISAPP)$(SUBVER).tar.gz +DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = clamav -PAK_VER = 63 +PAK_VER = 64 DEPS = @@ -51,7 +50,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = 09e67f4ae4f9689e634aa18cd672b16d8a4cb8b3923527c7c92ffa264b415dc49b5ee82ceaa518cf701a910b49a344753c7d0de894a772b0b871e492c95d60f4 +$(DL_FILE)_BLAKE2 = 62d00a9ceb1849d1517f34194daaa3bb8bbc904e81e3a20791cf0b5f557587cc497e23feb38cdfbb8b152446821eb20d9a4bce18a0c83d1c31474bfed9944c69 install : $(TARGET)