Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Nov 2005 08:09:13 -0500
From:      "Michael Scheidell" <scheidell@secnap.net>
To:        <freebsd-security@freebsd.org>
Cc:        ports@freebsd.org, rob@debank.tv
Subject:   Freebsd port issue: ZDI-05-002: Clam Antivirus Remote Code Execution
Message-ID:  <B3BCAF4246A8A84983A80DAB50FE72424C60C3@secnap2.secnap.com>

next in thread | raw e-mail | index | archive | help
This was in bugtraq, and hasn't shown up in portaudit yet so I thought I
would send it and the fix to you.

I submitted a pr for a patch as well. (but for some reason, ir bounced)

        Problem #1:
        Clamav 87 has been found to have a security vulnerability that
could
        lead to remote code execution

        Problem #2
        patch  patch-clamav-milter_clamav-milter.c won't apply cleanly
        (and I have't the slightest idea why, or even WHAT the patch
does:
--- clamav-milter/clamav-milter.c.orig
+++ clamav-milter/clamav-milter.c
@@ -3439,9 +3439,9 @@
 {
        fd_set rfds;
        struct timeval tv;
+       int ret;

        assert(sock >=3D 0);
-       int ret;

        if(readTimeout =3D=3D 0) {
                do

>How-To-Repeat:
        See:
http://www.zerodayinitiative.com/advisories/ZDI-05-002.html
        when trying to compile new clamav, get this:
Applying FreeBSD patches for clamav-0.87.1
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to
clamav-milter/clamav-milter.c.rej =3D> Patch
patch-clamav-milter_clamav-milter.c failed to apply cleanly.

>Fix:

remove patch (it looks like a dunsel)
rm files/patch-clamav-milter_clamav-milter.c
--- Makefile.orig       Fri Nov  4 17:57:18 2005
+++ Makefile    Sat Nov  5 07:26:14 2005
@@ -6,8 +6,7 @@
 #

 PORTNAME=3D      clamav
-PORTVERSION=3D   0.87
-PORTREVISION=3D  2
+PORTVERSION=3D   0.87.1
 CATEGORIES=3D    security
 MASTER_SITES=3D  ${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=3D    clamav
--- distinfo.orig       Fri Nov  4 17:57:23 2005
+++ distinfo    Sat Nov  5 07:26:02 2005
@@ -1,2 +1,2 @@
-MD5 (clamav-0.87.tar.gz) =3D dd0a12deb4f48f760fa1fcd378ae7c24 -SIZE
(clamav-0.87.tar.gz) =3D 4273714
+MD5 (clamav-0.87.1.tar.gz) =3D bf9f038edf0b6d5f76552e1b8d014b81 SIZE=20
+(clamav-0.87.1.tar.gz) =3D 4468992





ZDI-05-002: Clam Antivirus Remote Code Execution Vulnerability
http://www.zerodayinitiative.com/advisories/ZDI-05-002.html
November 4th, 2005

-- CVE ID:
CAN-2005-3303

-- Affected Vendor:
Clam AntiVirus

-- Affected Products:
Clam AntiVirus 0.80 through 0.87

-- TippingPoint(TM) IPS Customer Protection:
TippingPoint IPS customers have been protected against this
vulnerability since October 24th, 2005 by Digital Vaccine protection
filter ID 3874. For further product information on the TippingPoint IPS:

    http://www.tippingpoint.com=20

-- Vulnerability Details:
This vulnerability allows remote attackers to execute arbitrary code on
vulnerable ClamAV installations. Authentication is not required to
exploit this vulnerability.

This specific flaw exists within libclamav/fsg.c during the unpacking of
executable files compressed with FSG v1.33. Due to invalid bounds
checking when copying user-supplied data to heap allocated memory, an
exploitable memory corruption condition is created. The unpacking
algorithm for other versions of FSG is not affected.=20

-- Vendor Response:
The bug has been fixed in version 0.87.1. Release notes:

    http://www.sourceforge.net/project/shownotes.php?release_id=3D368319 =


-- Disclosure Timeline:
2005.10.24 - Vulnerability reported to vendor
2005.10.24 - Digital Vaccine released to TippingPoint customers
2005.10.25 - Vulnerability information provided to ZDI security partners
2005.11.04 - Public release of advisory

-- Credit:
This vulnerability was discovered by an anonymous ZDI researcher.

-- About the Zero Day Initiative (ZDI):
Established by TippingPoint, a division of 3Com, The Zero Day Initiative
(ZDI) represents a best-of-breed model for rewarding security
researchers for responsibly disclosing discovered vulnerabilities.

Researchers interested in getting paid for their security research
through the ZDI can find more information and sign-up at:

    http://www.zerodayinitiative.com

The ZDI is unique in how the acquired vulnerability information is used.
3Com does not re-sell the vulnerability details or any exploit code.
Instead, upon notifying the affected product vendor, 3Com provides its
customers with zero day protection through its intrusion prevention
technology. Explicit details regarding the specifics of the
vulnerability are not exposed to any parties until an official vendor
patch is publicly available. Furthermore, with the altruistic aim of
helping to secure a broader user base, 3Com provides this vulnerability
information confidentially to security vendors (including competitors)
who have a vulnerability protection or mitigation product.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B3BCAF4246A8A84983A80DAB50FE72424C60C3>