diff -Nru clamav-0.97.5+dfsg/ChangeLog clamav-0.97.6+dfsg/ChangeLog --- clamav-0.97.5+dfsg/ChangeLog 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/ChangeLog 2012-09-17 15:15:12.000000000 +0000 @@ -1,3 +1,36 @@ +Mon Sep 6 12:32:00 EDT 2012 (dar) +--------------------------------- + * libclamav: bb#5751 - cl_scansis() may returan a file descriptor instead + of a valid return code + +Mon Jul 2 10:40:50 EDT 2012 (dar) +---------------------------------- + * libclamav: bb#5252 - update #4, CL_EUNPACK and caching + +Fri Jun 29 14:43:43 EDT 2012 (dar) +---------------------------------- + * libclamav: bb#5252 - update #3, more return code tweaks + +Tue Jun 26 12:23:44 EDT 2012 (dar) +---------------------------------- + * libclamav: bb#5252 - Limit exits on scanraw return codes + +Fri Jun 22 16:58:21 EDT 2012 (dar) +---------------------------------- + * libclamav: bb#5325 - Quiet Minix warning + +Mon Jun 18 17:51:49 EDT 2012 (dar) +---------------------------------- + * libclamav: bb#5252 - Update magic_scandesc filtering of scanraw return codes + +Thu Jun 14 16:05:53 EDT 2012 (judge) +---------------------------------- + * win32: Add MSI projects. + +Wed Jun 13 12:00:55 EDT 2012 (olney) +---------------------------------- + * V 0.97.5 + Fri Jun 1 13:15:50 EST 2012 (dar) --------------------------------- * libclamav: Scan output at end of truncated tar (bb#4625) diff -Nru clamav-0.97.5+dfsg/NEWS clamav-0.97.6+dfsg/NEWS --- clamav-0.97.5+dfsg/NEWS 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/NEWS 2012-09-17 15:16:40.000000000 +0000 @@ -1,10 +1,9 @@ -0.97.5 +0.97.6 ------ -ClamAV 0.97.5 addresses possible evasion cases in some archive formats -(CVE-2012-1457, CVE-2012-1458, CVE-2012-1459). It also addresses stability -issues in portions of the bytecode engine. This release is recommended for all -users. +ClamAV 0.97.6 corrects two major bugs. One is bb#5571, where an invalid return +code was issued. The other is 5252, where an error in processing certain data +types occured. -- The ClamAV team (http://www.clamav.net/team) diff -Nru clamav-0.97.5+dfsg/README clamav-0.97.6+dfsg/README --- clamav-0.97.5+dfsg/README 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/README 2012-09-17 15:02:22.000000000 +0000 @@ -1,6 +1,10 @@ Note: This README/NEWS file refers to the source tarball. Some things described here may not be available in binary packages. -- +0.97.6 +------ +ClamAV 0.97.6 corrects bug 5252 "CL_EFORMAT: Bad format or broken data ERROR +reported as scan result. 0.97.5 ------ diff -Nru clamav-0.97.5+dfsg/configure clamav-0.97.6+dfsg/configure --- clamav-0.97.5+dfsg/configure 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/configure 2012-08-10 16:03:23.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for ClamAV 0.97.5. +# Generated by GNU Autoconf 2.65 for ClamAV 0.97.6. # # Report bugs to . # @@ -703,8 +703,8 @@ # Identity of this package. PACKAGE_NAME='ClamAV' PACKAGE_TARNAME='clamav' -PACKAGE_VERSION='0.97.5' -PACKAGE_STRING='ClamAV 0.97.5' +PACKAGE_VERSION='0.97.6' +PACKAGE_STRING='ClamAV 0.97.6' PACKAGE_BUGREPORT='http://bugs.clamav.net/' PACKAGE_URL='http://www.clamav.net/' @@ -1539,7 +1539,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ClamAV 0.97.5 to adapt to many kinds of systems. +\`configure' configures ClamAV 0.97.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1610,7 +1610,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ClamAV 0.97.5:";; + short | recursive ) echo "Configuration of ClamAV 0.97.6:";; esac cat <<\_ACEOF @@ -1767,7 +1767,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ClamAV configure 0.97.5 +ClamAV configure 0.97.6 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2231,7 +2231,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ClamAV $as_me 0.97.5, which was +It was created by ClamAV $as_me 0.97.6, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3345,7 +3345,7 @@ # Define the identity of the package. PACKAGE='clamav' - VERSION='0.97.5' + VERSION='0.97.6' # Some tools Automake needs. @@ -3474,10 +3474,10 @@ $as_echo "#define PACKAGE PACKAGE_NAME" >>confdefs.h -VERSION="0.97.5" +VERSION="0.97.6" LC_CURRENT=7 -LC_REVISION=14 +LC_REVISION=15 LC_AGE=1 LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE" @@ -20635,7 +20635,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ClamAV $as_me 0.97.5, which was +This file was extended by ClamAV $as_me 0.97.6, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20702,7 +20702,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ClamAV config.status 0.97.5 +ClamAV config.status 0.97.6 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" @@ -23220,7 +23220,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ClamAV $as_me 0.97.5, which was +This file was extended by ClamAV $as_me 0.97.6, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23287,7 +23287,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ClamAV config.status 0.97.5 +ClamAV config.status 0.97.6 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff -Nru clamav-0.97.5+dfsg/configure.in clamav-0.97.6+dfsg/configure.in --- clamav-0.97.5+dfsg/configure.in 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/configure.in 2012-08-10 16:03:00.000000000 +0000 @@ -20,7 +20,7 @@ AC_PREREQ([2.59]) dnl For a release change [devel] to the real version [0.xy] dnl also change VERSION below -AC_INIT([ClamAV], [0.97.5], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/]) +AC_INIT([ClamAV], [0.97.6], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/]) AH_BOTTOM([#include "platform.h"]) dnl put configure auxiliary into config @@ -43,10 +43,10 @@ dnl change this on a release dnl VERSION="devel-`date +%Y%m%d`" -VERSION="0.97.5" +VERSION="0.97.6" LC_CURRENT=7 -LC_REVISION=14 +LC_REVISION=15 LC_AGE=1 LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE" AC_SUBST([LIBCLAMAV_VERSION]) diff -Nru clamav-0.97.5+dfsg/debian/changelog clamav-0.97.6+dfsg/debian/changelog --- clamav-0.97.5+dfsg/debian/changelog 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/changelog 2012-10-19 02:48:23.000000000 +0000 @@ -1,29 +1,111 @@ -clamav (0.97.5+dfsg-1ubuntu0.12.04.3) precise-security; urgency=low +clamav (0.97.6+dfsg-1ubuntu0.12.04.1) precise-proposed; urgency=low - * SECURITY REGRESSION: Fix scanning failure. (LP: #1015405) - - Upstream commit 6a879ad98460303b23a6fc119769a3b463a902f8 to fix unpack - errors for various compressed files including some .bz2, .xls, .doc, and - PDF + * Microversion update to latest clamav release for precise (LP: #1064096) - -- Scott Kitterman Tue, 14 Aug 2012 21:51:52 -0400 + -- Scott Kitterman Mon, 08 Oct 2012 18:11:31 -0400 -clamav (0.97.5+dfsg-1ubuntu0.12.04.2) precise-security; urgency=low +clamav (0.97.6+dfsg-1ubuntu1) quantal; urgency=low - * SECURITY REGRESSION: Fix installation issue. (LP: #1015337) - - debian/clamav-base.postinst.in: Since we no longer ship daily.cvd and - main.cvd anymore, don't try and install them in the postinst. + * Merge from Debian unstable. Remaining changes: + - Drop build-dep on electric-fence (in Universe) + - Add apparmor profiles for clamd and freshclam along with maintainer + script changes + + -- Scott Kitterman Mon, 08 Oct 2012 12:29:39 -0400 + +clamav (0.97.6+dfsg-1) unstable; urgency=low + + * New upstream release (Closes: #689487) + * Update libclamav6 lintian override to match updated soversion + + -- Scott Kitterman Mon, 08 Oct 2012 12:11:43 -0400 + +clamav (0.97.5+dfsg-6ubuntu2) quantal; urgency=low + + * debian/clamav-base.install, debian/source_clamav.py: Install apport + hook so we can get AppArmor denials in bug reports. + + -- Marc Deslauriers Wed, 22 Aug 2012 08:33:24 -0400 + +clamav (0.97.5+dfsg-6ubuntu1) quantal; urgency=low + + * Merge from Debian unstable (LP: #1015405). Remaining changes: + - Drop build-dep on electric-fence (in Universe) + - Add apparmor profiles for clamd and freshclam along with maintainer + script changes + + -- Scott Kitterman Tue, 14 Aug 2012 21:29:59 -0400 + +clamav (0.97.5+dfsg-6) unstable; urgency=medium + + * Urgency medium for RC bug fix the addressess regression from 0.97.3 + * Add changes from upstream commit 6a879ad98460303b23a6fc119769a3b463a902f8 + to fix unpack errors for various compressed files including some .bz2, + .xls, .doc, and PDF (Closes: #684697) + + -- Scott Kitterman Tue, 14 Aug 2012 12:11:19 -0400 + +clamav (0.97.5+dfsg-5) unstable; urgency=low + + * Drop /var/run/clamav from the directories shipped in clamav-base (policy + 9.1.4) and trust it will get cleaned up on boot + - Thanks to Andreas Beckmann for the cluebat + + -- Scott Kitterman Thu, 19 Jul 2012 10:51:59 -0400 + +clamav (0.97.5+dfsg-4) unstable; urgency=low + + * Drop postrm snippets from clamav-base, clamav-freshclam, clamav-daemon, + and clamav-milter that remove /var/log/clamav, /var/lib/clamav, + /var/run/clamav, and /etc/clamav and and let dpkg remove the directories + once they are empty in order to fix problems with directory removal by a + package that did not own the directory (Closes: #681960) + * Add /var/run/clamav to directories shipped by clamav-base so dpkg cleanup + will work for it too. + + -- Scott Kitterman Wed, 18 Jul 2012 09:29:50 -0400 + +clamav (0.97.5+dfsg-3ubuntu1) quantal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Drop build-dep on electric-fence (in Universe) + - Add apparmor profiles for clamd and freshclam along with maintainer + script changes + + -- Scott Kitterman Mon, 09 Jul 2012 19:22:18 -0400 + +clamav (0.97.5+dfsg-3) unstable; urgency=low + + * Fix proxy port configuration handling in clamav-freshclam.postinst so that + failure to specify port does not result in an invalid configuration + (Closes: #678247), (LP: #784797) + + -- Scott Kitterman Sat, 30 Jun 2012 21:35:33 -0400 + +clamav (0.97.5+dfsg-2ubuntu1) quantal; urgency=low + + * Merge from Debian Unstable. Remaining Ubuntu changes: + - Drop build-dep on electric-fence (in Universe) + - Add apparmor profiles for clamd and freshclam along with maintainer + script changes - -- Marc Deslauriers Tue, 19 Jun 2012 20:01:11 -0400 + -- Scott Kitterman Tue, 19 Jun 2012 21:39:28 -0400 -clamav (0.97.5+dfsg-1ubuntu0.12.04.1) precise-security; urgency=low +clamav (0.97.5+dfsg-2) unstable; urgency=medium - * SECURITY UPDATE: Updated to 0.97.5 to fix multiple security issues with - malformed files. - - CVE-2012-1457 - - CVE-2012-1458 - - CVE-2012-1459 + * Medium urgency due to security fixes + * Update debian/clamav-base.postinst.in to test for the existence of the + actual .cvd files before trying to install them and not just the directory + they should be in (Closes: #678019) + * Remove /var/run/clamav on purge (LP: #829945) + - Thanks to Imre Gergely for the patch + * Add call to /sbin/restorecon in debian/common_functions make_directory to + to label the /run directory for SE Linux (Closes: #677686) + - Thanks to Russell Coker for the patch + * Remove obsolete reference to clamav-data package in clamav-daemon init log + failure message - -- Marc Deslauriers Mon, 18 Jun 2012 09:37:17 -0400 + -- Scott Kitterman Mon, 18 Jun 2012 20:32:06 -0400 clamav (0.97.5+dfsg-1ubuntu1) quantal; urgency=low @@ -47,7 +129,7 @@ - Add contrib/split-tarball.sh and docs/man/clambc.1 in the diff.gz (these used to be added to the Debian specific upstream tarball, but aren't upstream so are better in the diff) - - Change etc/clamav-milter.conf to Debian defaults + - Change etc/clamav-milter.conf to Debian defaults * Enabled hardened build flags (Closes: #653958) - Thanks to Moritz Muehlenhoff for the patch * Remove var/lib/clamav/daily.cvd and main.cvd from clamav-base.examples diff -Nru clamav-0.97.5+dfsg/debian/clamav-base.install clamav-0.97.6+dfsg/debian/clamav-base.install --- clamav-0.97.5+dfsg/debian/clamav-base.install 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-base.install 2012-10-19 02:48:23.000000000 +0000 @@ -1 +1,2 @@ debian/script usr/share/bug/clamav-base/ +debian/source_clamav.py usr/share/apport/package-hooks/ diff -Nru clamav-0.97.5+dfsg/debian/clamav-base.postinst.in clamav-0.97.6+dfsg/debian/clamav-base.postinst.in --- clamav-0.97.5+dfsg/debian/clamav-base.postinst.in 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-base.postinst.in 2012-10-19 02:48:23.000000000 +0000 @@ -381,6 +381,15 @@ db_stop || true fi + # Update database now + for db in main daily; do + if [ ! -e "$DATABASEDIR"/"$db".cvd ] && [ ! -d "$DATABASEDIR"/"$db".inc ] && \ + [ ! -e "$DATABASEDIR"/"$db".cld ] && [ -e /usr/share/doc/clamav-base/examples/"$db".cvd ] ; then + install -m 0644 -o $user -g $user /usr/share/doc/clamav-base/examples/"$db".cvd \ + "$DATABASEDIR" + fi + done + chmod 644 $CLAMAVCONF || true chown root:root $CLAMAVCONF || true ;; diff -Nru clamav-0.97.5+dfsg/debian/clamav-base.postrm clamav-0.97.6+dfsg/debian/clamav-base.postrm --- clamav-0.97.5+dfsg/debian/clamav-base.postrm 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-base.postrm 2012-10-19 02:48:23.000000000 +0000 @@ -45,11 +45,6 @@ fi rm -f /var/lib/clamav/*.md5sum || true rm -f $DATABASEDIR/main.cvd $DATABASEDIR/daily.cvd $DATABASEDIR/bytecode.cvd - for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do - if [ -d "$dir" ]; then - rmdir "$dir" --ignore-fail-on-non-empty || true - fi - done ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; diff -Nru clamav-0.97.5+dfsg/debian/clamav-daemon.init.in clamav-0.97.6+dfsg/debian/clamav-daemon.init.in --- clamav-0.97.5+dfsg/debian/clamav-daemon.init.in 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-daemon.init.in 2012-10-19 02:48:23.000000000 +0000 @@ -94,7 +94,7 @@ for db in main daily; do if [ ! -e "$DATABASEDIR"/"$db".cvd ] && [ ! -d "$DATABASEDIR"/"$db".inc ] && [ ! -e "$DATABASEDIR"/"$db".cld ]; then log_failure_msg "Clamav signatures not found in $DATABASEDIR" - log_failure_msg "Please retrieve them using freshclam or install the clamav-data package" + log_failure_msg "Please retrieve them using freshclam" log_failure_msg "Then run '/etc/init.d/clamav-daemon start'" exit 0 fi diff -Nru clamav-0.97.5+dfsg/debian/clamav-daemon.postrm clamav-0.97.6+dfsg/debian/clamav-daemon.postrm --- clamav-0.97.5+dfsg/debian/clamav-daemon.postrm 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-daemon.postrm 2012-10-19 02:48:23.000000000 +0000 @@ -37,11 +37,6 @@ if [ -e "$LOGROTATE_FILE" ]; then rm -f $LOGROTATE_FILE fi - for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do - if [ -d "$dir" ]; then - rmdir "$dir" --ignore-fail-on-non-empty || true - fi - done ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; diff -Nru clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in clamav-0.97.6+dfsg/debian/clamav-freshclam.postinst.in --- clamav-0.97.5+dfsg/debian/clamav-freshclam.postinst.in 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-freshclam.postinst.in 2012-10-19 02:48:23.000000000 +0000 @@ -106,6 +106,9 @@ url="`echo "$RET" | sed -e 's,^http://,,g' | sed -e 's,/$,,g'`" phost="`echo "$url" | cut -d':' -f 1`" pport="`echo "$url" | cut -d':' -f 2`" + if [ "$pport" = "$phost" ]; then + pport="" + fi fullurl="$RET" db_metaget clamav-freshclam/proxy_user value || true if [ "$RET" != "" ]; then @@ -264,10 +267,12 @@ grep -q "$m" "$DEBCONFILE" || echo "DatabaseMirror $m" >> $DEBCONFILE done - if [ -n "$phost" ] && [ -n "$pport" ]; then + if [ -n "$phost" ]; then echo "# Proxy: $fullurl" >> $DEBCONFILE echo "HTTPProxyServer $phost" >> $DEBCONFILE - echo "HTTPProxyPort $pport" >> $DEBCONFILE + if [ -n "$pport" ]; then + echo "HTTPProxyPort $pport" >> $DEBCONFILE + fi fi if [ -n "$puser" ] && [ -n "$ppass" ]; then echo "# Proxy authentication: $fulluser" >> $DEBCONFILE diff -Nru clamav-0.97.5+dfsg/debian/clamav-freshclam.postrm clamav-0.97.6+dfsg/debian/clamav-freshclam.postrm --- clamav-0.97.5+dfsg/debian/clamav-freshclam.postrm 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-freshclam.postrm 2012-10-19 02:48:23.000000000 +0000 @@ -52,11 +52,6 @@ [ ! -d "${workdir}/main.inc/" ] || rmdir --ignore-fail-on-non-empty ${workdir}/main.inc/ [ ! -d "${workdir}/daily.inc/" ] || rmdir --ignore-fail-on-non-empty ${workdir}/daily.inc/ update-rc.d clamav-freshclam remove >/dev/null - for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do - if [ -d "$dir" ]; then - rmdir "$dir" --ignore-fail-on-non-empty || true - fi - done ;; remove) rm -f /var/lib/clamav/main.cvd /var/lib/clamav/main.cld diff -Nru clamav-0.97.5+dfsg/debian/clamav-milter.postrm clamav-0.97.6+dfsg/debian/clamav-milter.postrm --- clamav-0.97.5+dfsg/debian/clamav-milter.postrm 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/clamav-milter.postrm 2012-10-19 02:48:23.000000000 +0000 @@ -35,11 +35,6 @@ fi done rm -f /var/log/clamav/clamav-milter.log* /etc/clamav/clamav-milter.conf.dpkg-old /etc/clamav/clamav-milter.conf.ucf-old - for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do - if [ -d "$dir" ]; then - rmdir "$dir" --ignore-fail-on-non-empty || true - fi - done ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; diff -Nru clamav-0.97.5+dfsg/debian/common_functions clamav-0.97.6+dfsg/debian/common_functions --- clamav-0.97.5+dfsg/debian/common_functions 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/common_functions 2012-10-19 02:48:23.000000000 +0000 @@ -171,6 +171,7 @@ [ -n "$User" ] || User=clamav mkdir -p -m 0755 "$DIR" chown "$User" "$DIR" + [ -x /sbin/restorecon ] && /sbin/restorecon "$DIR" } # Debconf Functions diff -Nru clamav-0.97.5+dfsg/debian/libclamav6.lintian-overrides clamav-0.97.6+dfsg/debian/libclamav6.lintian-overrides --- clamav-0.97.5+dfsg/debian/libclamav6.lintian-overrides 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/libclamav6.lintian-overrides 2012-10-19 02:48:23.000000000 +0000 @@ -1 +1 @@ -libclamav6 binary: embedded-library usr/lib/libclamav.so.6.1.14: zlib +libclamav6 binary: embedded-library usr/lib/libclamav.so.6.1.15: zlib diff -Nru clamav-0.97.5+dfsg/debian/source_clamav.py clamav-0.97.6+dfsg/debian/source_clamav.py --- clamav-0.97.5+dfsg/debian/source_clamav.py 1970-01-01 00:00:00.000000000 +0000 +++ clamav-0.97.6+dfsg/debian/source_clamav.py 2012-10-19 02:48:23.000000000 +0000 @@ -0,0 +1,17 @@ +'''apport package hook for clamav + +(c) 2012 Canonical Ltd. +Author: Marc Deslauriers +''' + +from apport.hookutils import * + +def add_info(report): + # Get configuration files + attach_conffiles(report, 'clamav-freshclam') + attach_conffiles(report, 'clamav-daemon') + attach_file_if_exists(report, '/etc/clamav/clamd.conf') + attach_file_if_exists(report, '/etc/clamav/freshclam.conf') + + # Get apparmor logs + attach_mac_events(report, ['/usr/bin/freshclam', '/usr/sbin/clamd']) diff -Nru clamav-0.97.5+dfsg/libclamav/bytecode_detect.h clamav-0.97.6+dfsg/libclamav/bytecode_detect.h --- clamav-0.97.5+dfsg/libclamav/bytecode_detect.h 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/bytecode_detect.h 2012-06-27 13:04:48.000000000 +0000 @@ -83,6 +83,7 @@ llvm_os_Solaris, llvm_os_Win32, llvm_os_Haiku, + llvm_os_Minix, llvm_os_ANY = 0xff }; diff -Nru clamav-0.97.5+dfsg/libclamav/c++/detect.cpp clamav-0.97.6+dfsg/libclamav/c++/detect.cpp --- clamav-0.97.5+dfsg/libclamav/c++/detect.cpp 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/c++/detect.cpp 2012-06-27 13:04:48.000000000 +0000 @@ -158,6 +158,7 @@ warn_assumptions("Operating System", env->os_category, Triple::Win32); break; CASE_OS(Haiku, os_unknown); + CASE_OS(Minix, os_unknown); } // mmap RWX diff -Nru clamav-0.97.5+dfsg/libclamav/others.h clamav-0.97.6+dfsg/libclamav/others.h --- clamav-0.97.5+dfsg/libclamav/others.h 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/others.h 2012-08-10 16:02:00.000000000 +0000 @@ -53,7 +53,7 @@ * in re-enabling affected modules. */ -#define CL_FLEVEL 65 +#define CL_FLEVEL 67 #define CL_FLEVEL_DCONF CL_FLEVEL #define CL_FLEVEL_SIGTOOL CL_FLEVEL diff -Nru clamav-0.97.5+dfsg/libclamav/scanners.c clamav-0.97.6+dfsg/libclamav/scanners.c --- clamav-0.97.5+dfsg/libclamav/scanners.c 2012-10-19 02:48:22.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/scanners.c 2012-08-06 20:26:55.000000000 +0000 @@ -2361,26 +2361,47 @@ if(type != CL_TYPE_IGNORED && (type != CL_TYPE_HTML || !(DCONF_DOC & DOC_CONF_HTML_SKIPRAW)) && !ctx->engine->sdb) { res = cli_scanraw(ctx, type, typercg, &dettype, hash); if(res != CL_CLEAN) { - if(res == CL_VIRUS) - ret = cli_checkfp(hash, hashed_size, ctx); - else - ret = res; - funmap(*ctx->fmap); - ctx->fmap--; - cli_bitset_free(ctx->hook_lsig_matches); - ctx->hook_lsig_matches = old_hook_lsig_matches; - /* Same switch as end of magic_scandesc function */ - switch(ret) { - case CL_EFORMAT: + switch(res) { + /* List of scan halts, runtime errors only! */ + case CL_EUNLINK: + case CL_ESTAT: + case CL_ESEEK: + case CL_EWRITE: + case CL_EDUP: + case CL_ETMPFILE: + case CL_ETMPDIR: + case CL_EMEM: + case CL_ETIMEOUT: + cli_dbgmsg("Descriptor[%d]: cli_scanraw error %s\n", desc, cl_strerror(res)); + funmap(*ctx->fmap); + ctx->fmap--; + cli_bitset_free(ctx->hook_lsig_matches); + ctx->hook_lsig_matches = old_hook_lsig_matches; + ret_from_magicscan(res); + /* CL_VIRUS = malware found, check FP and report */ + case CL_VIRUS: + ret = cli_checkfp(hash, hashed_size, ctx); + funmap(*ctx->fmap); + ctx->fmap--; + cli_bitset_free(ctx->hook_lsig_matches); + ctx->hook_lsig_matches = old_hook_lsig_matches; + ret_from_magicscan(ret); + /* "MAX" conditions should still fully scan the current file */ case CL_EMAXREC: case CL_EMAXSIZE: case CL_EMAXFILES: - cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(ret)); - case CL_CLEAN: /* here, only from cli_checkfp() */ - cache_add(hash, hashed_size, ctx); - ret_from_magicscan(CL_CLEAN); + ret = res; + cli_dbgmsg("Descriptor[%d]: Continuing after cli_scanraw reached %s\n", + desc, cl_strerror(res)); + break; + /* Other errors must not block further scans below + * This specifically includes CL_EFORMAT & CL_EREAD & CL_EUNPACK + * Malformed/truncated files could report as any of these three. + */ default: - ret_from_magicscan(ret); + ret = res; + cli_dbgmsg("Descriptor[%d]: Continuing after cli_scanraw error %s\n", + desc, cl_strerror(res)); } } } @@ -2424,11 +2445,16 @@ ctx->hook_lsig_matches = old_hook_lsig_matches; switch(ret) { + /* Malformed file cases */ case CL_EFORMAT: + case CL_EREAD: + case CL_EUNPACK: + /* Limits exceeded */ case CL_EMAXREC: case CL_EMAXSIZE: case CL_EMAXFILES: cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(ret)); + ret_from_magicscan(CL_CLEAN); case CL_CLEAN: cache_add(hash, hashed_size, ctx); ret_from_magicscan(CL_CLEAN); diff -Nru clamav-0.97.5+dfsg/libclamav/sis.c clamav-0.97.6+dfsg/libclamav/sis.c --- clamav-0.97.5+dfsg/libclamav/sis.c 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/sis.c 2012-09-17 15:19:33.000000000 +0000 @@ -95,11 +95,16 @@ } cli_dbgmsg("SIS: UIDS %x %x %x - %x\n", EC32(uid[0]), EC32(uid[1]), EC32(uid[2]), EC32(uid[3])); - if (uid[2]==EC32(0x10000419)) + if (uid[2]==le32_to_host(0x10000419)) { i=real_scansis(f, ctx, tmpd); - else if(uid[0]==EC32(0x10201a7a)) { + } + else if(uid[0]==le32_to_host(0x10201a7a)) { i=real_scansis9x(f, ctx, tmpd); } + else { + cli_dbgmsg("SIS: UIDs failed to match\n"); + i=CL_EFORMAT; + } if (!ctx->engine->keeptmp) cli_rmdirs(tmpd); diff -Nru clamav-0.97.5+dfsg/libclamav/version.h clamav-0.97.6+dfsg/libclamav/version.h --- clamav-0.97.5+dfsg/libclamav/version.h 2012-06-15 14:05:05.000000000 +0000 +++ clamav-0.97.6+dfsg/libclamav/version.h 2012-08-10 17:10:35.000000000 +0000 @@ -1 +1 @@ -#define REPO_VERSION "devel-clamav-0.97.5" +#define REPO_VERSION "devel-clamav-0.97.6"