pkgsrc/security/clamav/Makefile
taca 3b485de1e9 security/clamav: update to 0.103.6
0.103.6 (2022-05-04)

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

- [CVE-2022-20770](CVE-2022-20770): Fixed a possible infinite loop vulnerability
  in the CHM file parser.
  Issue affects versions 0.104.0 through 0.104.2 and LTS version 0.103.5 and
  prior versions.
  Thank you to Michał Dardas for reporting this issue.

- [CVE-2022-20796](CVE-2022-20796): Fixed a possible NULL-pointer dereference
  crash in the scan verdict cache check.
  Issue affects versions 0.103.4, 0.103.5, 0.104.1, and 0.104.2.
  Thank you to Alexander Patrakov and Antoine Gatineau for reporting this issue.

- [CVE-2022-20771](CVE-2022-20771): Fixed a possible infinite loop vulnerability
  in the TIFF file parser.
  Issue affects versions 0.104.0 through 0.104.2 and LTS version 0.103.5 and
  prior versions.
  The issue only occurs if the "--alert-broken-media" ClamScan option is
  enabled. For ClamD, the affected option is "AlertBrokenMedia yes", and for
  libclamav it is the "CL_SCAN_HEURISTIC_BROKEN_MEDIA" scan option.
  Thank you to Michał Dardas for reporting this issue.

- [CVE-2022-20785](CVE-2022-20785): Fixed a possible memory leak in the
  HTML file parser / Javascript normalizer.
  Issue affects versions 0.104.0 through 0.104.2 and LTS version 0.103.5 and
  prior versions.
  Thank you to Michał Dardas for reporting this issue.

- [CVE-2022-20792](CVE-2022-20792): Fixed a possible multi-byte heap buffer
  overflow write vulnerability in the signature database load module.
  The fix was to update the vendored regex library to the latest version.
  Issue affects versions 0.104.0 through 0.104.2 and LTS version 0.103.5 and
  prior versions.
  Thank you to Michał Dardas for reporting this issue.

- ClamOnAcc: Fixed a number of assorted stability issues and added niceties for
  debugging ClamOnAcc. Patches courtesy of Frank Fegert.

- Fixed an issue causing byte-compare subsignatures to cause an alert when they
  match even if other conditions of the given logical signatures were not met.

- Fix memleak when using multiple byte-compare subsignatures.
  This fix was backported from 0.104.0.
  Thank you to Andrea De Pasquale for contributing the fix.

- Assorted bug fixes and improvements.

Special thanks to the following people for code contributions and bug reports:
- Alexander Patrakov
- Andrea De Pasquale
- Antoine Gatineau
- Frank Fegert
- Michał Dardas
2022-05-05 00:44:07 +00:00

100 lines
3.1 KiB
Makefile

# $NetBSD: Makefile,v 1.84 2022/05/05 00:44:07 taca Exp $
.include "Makefile.common"
COMMENT= Anti-virus toolkit
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= gsed
GNU_CONFIGURE= yes
SET_LIBDIR= yes
FAKE_NCURSES= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-dbdir=${CLAMAV_DBDIR}
CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP}
CONFIGURE_ARGS+= --with-user=${CLAMAV_USER}
CONFIGURE_ARGS+= --with-libcurl=${BUILDLINK_PREFIX.curl}
CONFIGURE_ARGS+= --with-libjson=${BUILDLINK_PREFIX.json-c}
CONFIGURE_ARGS+= --with-ltdl-include=${BUILDLINK_PREFIX.libltdl}/include
CONFIGURE_ARGS+= --with-ltdl-lib=${BUILDLINK_PREFIX.libltdl}/lib
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-pcre=${BUILDLINK_PREFIX.pcre2}
CONFIGURE_ARGS+= --with-system-libmspack=${BUILDLINK_PREFIX.libmspack}
CONFIGURE_ARGS+= --with-xml=${BUILDLINK_PREFIX.libxml2}
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
# Linux only:
CONFIGURE_ARGS+= --disable-clamonacc
# Work around build failure PR pkg/54420
CONFIGURE_ARGS+= --disable-unrar
CONFIGURE_ENV.SunOS+= ac_cv_ld_version_script=no
CHECK_PORTABILITY_SKIP= contrib/* unit_tests/* win32/*
.include "../../mk/compiler.mk"
NOT_PAX_MPROTECT_SAFE+= sbin/clamd
NOT_PAX_MPROTECT_SAFE+= bin/clamscan
NOT_PAX_MPROTECT_SAFE+= bin/freshclam
CFLAGS.SunOS+= -D__EXTENSIONS__
.if !empty(PKGSRC_COMPILER:Mclang) || !empty(CC_VERSION:Mgcc-[6-9]*) || !empty(CC_VERSION:Mgcc-1[0-9].*)
CFLAGS.SunOS+= -D_XOPEN_SOURCE=600
.endif
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP CLAMAV_DBDIR
FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER}
FILES_SUBST+= CLAMAV_GROUP=${CLAMAV_GROUP}
FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR}
MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER}
SUBST_CLASSES+= vars
SUBST_STAGE.vars= pre-configure
SUBST_FILES.vars= etc/clamav-milter.conf.sample etc/clamd.conf.sample
SUBST_VARS.vars= CLAMAV_DBDIR
RCD_SCRIPTS= clamd freshclamd
SMF_METHODS= clamd freshclamd
SMF_INSTANCES= ${SMF_METHODS}
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}
PKG_GROUPS_VARS+= CLAMAV_GROUP
PKG_USERS_VARS= CLAMAV_USER
EGDIR= ${PREFIX}/share/examples/clamav
CONF_SAMPLES= clamd.conf freshclam.conf
.include "options.mk"
OWN_DIRS_PERMS= ${CLAMAV_DBDIR} ${CLAMAV_USER} ${CLAMAV_GROUP} 0775
CONF_FILES= # empty
CONF_FILES_PERMS= # empty
.for i in ${CONF_SAMPLES}
CONF_FILES+= ${EGDIR}/${i} ${PKG_SYSCONFDIR}/${i}
.endfor
INSTALLATION_DIRS+= ${EGDIR}
post-install:
.for i in ${CONF_SAMPLES}
${MV} ${DESTDIR}${PKG_SYSCONFDIR}/${i}.sample ${DESTDIR}${EGDIR}/${i}
.endfor
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/libmspack/buildlink3.mk"
.include "../../devel/libltdl/buildlink3.mk"
.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"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"