pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/clamav security/clamav: update to 0.103.4



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f870fe710648
branches:  trunk
changeset: 769135:f870fe710648
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Nov 08 14:49:23 2021 +0000

description:
security/clamav: update to 0.103.4

ClamAV 0.103.4 is a critical patch release with the following fixes:

- FreshClam:
  - Add a 24-hour cool-down for FreshClam clients that have received an HTTP
    403 (Forbidden) response from the CDN.
    This is to reduce the volume of 403-response data served to blocked
    FreshClam clients that are configured with a tight update-loop.
  - Fixed a bug where FreshClam treats an empty CDIFF as an incremental update
    failure instead of as an intentional request to download the whole CVD.

- ClamDScan: Fix a scan error when broken symlinks are encountered on macOS with
  "FollowDirectorySymlinks" and "FollowFileSymlinks" options disabled.

- Overhauled the scan recursion / nested archive extraction logic and added new
  limits on embedded file-type recognition performed during the "raw" scan of
  each file. This limits embedded file-type misidentification and prevents
  detecting embedded file content that is found/extracted and scanned at other
  layers in the scanning process.

- Fix an issue with the FMap module that failed to read from some nested files.

- Fixed an issue where failing to load some rules from a Yara file containing
  multiple rules may cause a crash.

- Fixed assorted compiler warnings.

- Fixed assorted Coverity static code analysis issues.

- Scan limits:
  - Added virus-name suffixes to the alerts that trigger when a scan limit has
    been exceeded. Rather than simply `Heuristics.Limits.Exceeded`, you may now
    see limit-specific virus-names, to include:
    - `Heuristics.Limits.Exceeded.MaxFileSize`
    - `Heuristics.Limits.Exceeded.MaxScanSize`
    - `Heuristics.Limits.Exceeded.MaxFiles`
    - `Heuristics.Limits.Exceeded.MaxRecursion`
    - `Heuristics.Limits.Exceeded.MaxScanTime`
  - Renamed the `Heuristics.Email.ExceedsMax.*` alerts to align with the other
    limit alerts names. These alerts include:
    - `Heuristics.Limits.Exceeded.EmailLineFoldcnt`
    - `Heuristics.Limits.Exceeded.EmailHeaderBytes`
    - `Heuristics.Limits.Exceeded.EmailHeaders`
    - `Heuristics.Limits.Exceeded.EmailMIMEPartsPerMessage`
    - `Heuristics.Limits.Exceeded.EmailMIMEArguments`
  - Fixed an issue where the Email-related scan limits would alert even when the
    "AlertExceedsMax" (`--alert-exceeds-max`) scan option is not enabled.
  - Fixes an issue in the Zip parser where exceeding the "MaxFiles" limit or
    the "MaxFileSize" limit would abort the scan but would fail to alert.
    The Zip scan limit issues were independently identified and reported by
    Aaron Leliaert and Max Allan.

- Fixed a leak in the Email parser when using the `--gen-json` scan option.

- Fixed an issue where a failure to record metadata in the Email parser when
  using the `--gen-json` scan option could cause the Email parser to abort the
  scan early and fail to extract and scan additional content.

- Fixed a file name memory leak in the Zip parser.

- Fixed an issue where certain signature patterns may cause a crash or cause
  unintended matches on some systems when converting characters to uppercase if
  a UTF-8 unicode single-byte grapheme becomes a multi-byte grapheme.
  Patch courtesy of Andrea De Pasquale.

Other fixes backported from 0.104.0:

- Fixed a crash in programs that use libclamav when the programs don't set a
  callback for the "virus found" event.
  Patch courtesy of Markus Strehle.

- Added checks to the the SIS archive parser to prevent an SIS file entry from
  pointing to the archive, which would result in a loop. This was not an actual
  infinite loop, as ClamAV's scan recursion limit limits the depth of nested
  archive extraction.

- ClamOnAcc: Fixed a socket file descriptor leak that could result in a crash
  when all available file descriptors are exhausted.

- FreshClam: Fixed an issue where FreshClam would download a CVD repeatedly if a
  zero-byte CDIFF is downloaded or if the incremental update failed and if the
  CVD downloaded after that is older than advertised.
  Patch courtesy of Andrew Williams.

- ClamDScan:
  - Fixed a memory leak of the scan target filename when using the
    `--fdpass` or `--stream` options.
  - Fixed an issue where ClamDScan would fail to scan any file after excluding
    a file with the "ExcludePath" option when using when using the `--multiscan`
    (`-m`) option along with either `--fdpass` or `--stream`.
    Also fixed a memory leak of the accidentally-excluded paths in this case.
  - Fixed a single file path memory leak when using `--fdpass`.
  - Fixed an issue where the "ExcludePath" regex may fail to exclude absolute
    paths when the scan is invoked with a relative path.

Special thanks to the following for code contributions and bug reports:
- Aaron Leliaert
- Andrea De Pasquale
- Andrew Williams
- Markus Strehle
- Max Allan

diffstat:

 security/clamav/Makefile                       |   4 ++--
 security/clamav/Makefile.common                |   4 ++--
 security/clamav/distinfo                       |  12 ++++++------
 security/clamav/patches/patch-libclamav_fmap.c |  10 +++++-----
 security/clamav/patches/patch-libclamav_fmap.h |  12 ++++++------
 5 files changed, 21 insertions(+), 21 deletions(-)

diffs (121 lines):

diff -r 7615ed92bd94 -r f870fe710648 security/clamav/Makefile
--- a/security/clamav/Makefile  Mon Nov 08 14:44:46 2021 +0000
+++ b/security/clamav/Makefile  Mon Nov 08 14:49:23 2021 +0000
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.79 2021/09/29 19:01:15 adam Exp $
+# $NetBSD: Makefile,v 1.80 2021/11/08 14:49:23 taca Exp $
 
-PKGREVISION= 1
 .include "Makefile.common"
 
 COMMENT=       Anti-virus toolkit
@@ -91,6 +90,7 @@
 .include "../../devel/pcre2/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../devel/gmp/buildlink3.mk"
+.include "../../mail/libmilter/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../textproc/json-c/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
diff -r 7615ed92bd94 -r f870fe710648 security/clamav/Makefile.common
--- a/security/clamav/Makefile.common   Mon Nov 08 14:44:46 2021 +0000
+++ b/security/clamav/Makefile.common   Mon Nov 08 14:49:23 2021 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.common,v 1.20 2021/06/03 15:47:34 taca Exp $
+# $NetBSD: Makefile.common,v 1.21 2021/11/08 14:49:23 taca Exp $
 #
 # used by security/clamav/Makefile
 # used by security/clamav-doc/Makefile
 
-DISTNAME=      clamav-0.103.2
+DISTNAME=      clamav-0.103.4
 CATEGORIES=    security
 MASTER_SITES=  http://www.clamav.net/downloads/production/
 
diff -r 7615ed92bd94 -r f870fe710648 security/clamav/distinfo
--- a/security/clamav/distinfo  Mon Nov 08 14:44:46 2021 +0000
+++ b/security/clamav/distinfo  Mon Nov 08 14:49:23 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.39 2021/10/26 11:17:01 nia Exp $
+$NetBSD: distinfo,v 1.40 2021/11/08 14:49:23 taca Exp $
 
-BLAKE2s (clamav-0.103.2.tar.gz) = de4f6591e9f77c94acb889d5f5742a7e1ae0a5e09dedd0390f7494b0a4ab6150
-SHA512 (clamav-0.103.2.tar.gz) = 87d47c4529a57da0b47b3744a279996ca24fa74ce10d7e27a53c19c1e13098af680e0e48ed767122bb2bbd3f927302451da84ccf51a933e7e3556ef43cbe9f45
-Size (clamav-0.103.2.tar.gz) = 13387954 bytes
+BLAKE2s (clamav-0.103.4.tar.gz) = 0a64b0534d4b8919c787fbd7152ff87eb875b702215bccf0b586b8d9e854d69f
+SHA512 (clamav-0.103.4.tar.gz) = 422a8cb98d355be098b0a0c575e4f08cf964e992d10ee02e7600eb9db6dfa943efbd988489f268e81e4d2ef29cfe582b236688ea209d6d2e46467f3c08eb475e
+Size (clamav-0.103.4.tar.gz) = 16425023 bytes
 SHA1 (patch-Makefile.in) = 51e0f42323f07b7ae0cb35a640469dce4e1a2041
 SHA1 (patch-aa) = c07a7b6e883f384ce278964645f0658c0d986ab5
 SHA1 (patch-ab) = 78793f0267ce8c820b51937186dc17dabb4a1ccf
@@ -10,5 +10,5 @@
 SHA1 (patch-etc_clamav-milter.conf.sample) = fa65d9b25cb51c62365b1d5a8b6dafe89d505057
 SHA1 (patch-etc_clamd.conf.sample) = e2c60b81675e73600409f76457fbc7cd8ec51a8f
 SHA1 (patch-etc_freshclam.conf.sample) = 804df5480560acb915f9fcb5f2097673c657ae34
-SHA1 (patch-libclamav_fmap.c) = 562ea6f07e495fb4e34b5788485c0afb5105cf6b
-SHA1 (patch-libclamav_fmap.h) = b9d19b872bc7946da4a321d3d84b7e916f84d31c
+SHA1 (patch-libclamav_fmap.c) = d608faf56aebfcb32146b04a21ab587ee4a1a06d
+SHA1 (patch-libclamav_fmap.h) = 4511c7670e871ff5a67e5fa4c7c2a2fd2ceca7b1
diff -r 7615ed92bd94 -r f870fe710648 security/clamav/patches/patch-libclamav_fmap.c
--- a/security/clamav/patches/patch-libclamav_fmap.c    Mon Nov 08 14:44:46 2021 +0000
+++ b/security/clamav/patches/patch-libclamav_fmap.c    Mon Nov 08 14:49:23 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-libclamav_fmap.c,v 1.4 2021/02/28 17:14:10 taca Exp $
+$NetBSD: patch-libclamav_fmap.c,v 1.5 2021/11/08 14:49:23 taca Exp $
 
 rename gets to my_gets to avoid conflict with fortify/ssp - they use
 macros to override libc functions
 
---- libclamav/fmap.c.orig      2021-02-01 20:49:26.000000000 +0000
+--- libclamav/fmap.c.orig      2021-11-02 15:47:47.000000000 +0000
 +++ libclamav/fmap.c
-@@ -424,7 +424,7 @@ extern cl_fmap_t *cl_fmap_open_handle(vo
+@@ -426,7 +426,7 @@ extern cl_fmap_t *cl_fmap_open_handle(vo
      m->unmap           = unmap_handle;
      m->need            = handle_need;
      m->need_offstr     = handle_need_offstr;
@@ -13,8 +13,8 @@
 +    m->my_gets         = handle_gets;
      m->unneed_off      = handle_unneed_off;
      m->handle_is_fd    = 1;
- 
-@@ -849,7 +849,7 @@ fmap_t *fmap_open_memory(const void *sta
+     m->have_maphash    = false;
+@@ -853,7 +853,7 @@ fmap_t *fmap_open_memory(const void *sta
      m->unmap       = unmap_malloc;
      m->need        = mem_need;
      m->need_offstr = mem_need_offstr;
diff -r 7615ed92bd94 -r f870fe710648 security/clamav/patches/patch-libclamav_fmap.h
--- a/security/clamav/patches/patch-libclamav_fmap.h    Mon Nov 08 14:44:46 2021 +0000
+++ b/security/clamav/patches/patch-libclamav_fmap.h    Mon Nov 08 14:49:23 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-libclamav_fmap.h,v 1.2 2019/10/10 15:41:30 prlw1 Exp $
+$NetBSD: patch-libclamav_fmap.h,v 1.3 2021/11/08 14:49:23 taca Exp $
 
 rename gets to my_gets to avoid conflict with fortify/ssp - they use
 macros to override libc functions
 
---- libclamav/fmap.h.orig      2019-10-01 17:24:09.000000000 +0000
+--- libclamav/fmap.h.orig      2021-11-02 15:47:47.000000000 +0000
 +++ libclamav/fmap.h
-@@ -75,7 +75,7 @@ struct cl_fmap {
+@@ -78,7 +78,7 @@ struct cl_fmap {
      void (*unmap)(fmap_t *);
      const void *(*need)(fmap_t *, size_t at, size_t len, int lock);
      const void *(*need_offstr)(fmap_t *, size_t at, size_t len_hint);
@@ -14,12 +14,12 @@
      void (*unneed_off)(fmap_t *, size_t at, size_t len);
  #ifdef _WIN32
      HANDLE fh;
-@@ -169,7 +169,7 @@ static inline const void *fmap_need_offs
- 
+@@ -353,7 +353,7 @@ static inline const void *fmap_need_offs
+  */
  static inline const void *fmap_gets(fmap_t *m, char *dst, size_t *at, size_t max_len)
  {
 -    return m->gets(m, dst, at, max_len);
 +    return m->my_gets(m, dst, at, max_len);
  }
  
- static inline const void *fmap_need_off_once_len(fmap_t *m, size_t at, size_t len, size_t *lenout)
+ /**



Home | Main Index | Thread Index | Old Index