summaryrefslogtreecommitdiffstats
path: root/security/clamav
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-02-10 14:06:49 +0000
committereik <eik@FreeBSD.org>2004-02-10 14:06:49 +0000
commit7e9b056e3902eb2239d98c394b8a084dcc2d65ba (patch)
treeabd111ed3389782d95135a97c7065597aa3579ac /security/clamav
parent1649dc80987c139b54bf945b4fd1310f61b1a9cd (diff)
downloadFreeBSD-ports-7e9b056e3902eb2239d98c394b8a084dcc2d65ba.zip
FreeBSD-ports-7e9b056e3902eb2239d98c394b8a084dcc2d65ba.tar.gz
*** SECURITY update ***
- fix a trivially remote exploitable DOS vulnerability <http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/62586> <http://www.securityfocus.com/archive/1/353186> while I'm here, fix stale socket removal. Perhaps enabling FixStaleSocket in clamav.conf would be a better idea, but I don't want to overuse this security related commit. PR: 62586, 62601 Submitted by: eik, Vivek Khera <vivek@khera.org> Reviewed by: bugtraq mailing list Approved by: security-officer
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile4
-rw-r--r--security/clamav/files/clamav-clamd.sh6
-rw-r--r--security/clamav/files/patch-libclamav::message.c27
3 files changed, 32 insertions, 5 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 69a0716..7ed577e 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.65
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= clamav
@@ -54,7 +54,7 @@ SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
-e 's|^\#?(PidFile) .*$$|\1 /var/run/clamav/clamd.pid|' \
- -e 's|^\#?(LocalSocket) .*$$|\1 /var/run/clamav/clamd|' \
+ -e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \
-e 's|^\#?(User) .*$$|\1 clamav|' \
-e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \
-e 's|^\#?(ScanMail)$$|\1|'
diff --git a/security/clamav/files/clamav-clamd.sh b/security/clamav/files/clamav-clamd.sh
index add6347..154ecc4 100644
--- a/security/clamav/files/clamav-clamd.sh
+++ b/security/clamav/files/clamav-clamd.sh
@@ -30,9 +30,9 @@ start_precmd=start_precmd
start_precmd()
{
- if [ -S "$clamd_socket" ]; then
- warn "Stale socket $clamd_socket removed."
- rm "$clamd_socket"
+ if [ -S "$clamav_clamd_socket" ]; then
+ warn "Stale socket $clamav_clamd_socket removed."
+ rm "$clamav_clamd_socket"
fi
}
diff --git a/security/clamav/files/patch-libclamav::message.c b/security/clamav/files/patch-libclamav::message.c
new file mode 100644
index 0000000..eb322ff
--- /dev/null
+++ b/security/clamav/files/patch-libclamav::message.c
@@ -0,0 +1,27 @@
+--- libclamav/message.c.orig Wed Nov 5 11:59:53 2003
++++ libclamav/message.c Tue Feb 10 14:39:23 2004
+@@ -878,15 +878,20 @@
+ if(strcasecmp(line, "end") == 0)
+ break;
+
+- assert(strlen(line) <= 62);
+ if((line[0] & 0x3F) == ' ')
+ break;
+
+ len = *line++ - ' ';
+
+- assert((len >= 0) && (len <= 63));
+-
+- ptr = decode(line, ptr, uudecode, (len & 3) == 0);
++ if(len < 0 || len > 63)
++ /*
++ * In practice this should never occur since
++ * the maximum length of a uuencoded line is
++ * 62 characters
++ */
++ cli_warnmsg("uudecode: buffer overflow stopped, attempting to ignore but decoding may fail");
++ else
++ ptr = decode(line, ptr, uudecode, (len & 3) == 0);
+ break;
+
+ case BINARY:
OpenPOWER on IntegriCloud