Freebsd port issue: ZDI-05-002: Clam Antivirus Remote Code Execution

From: Michael Scheidell (scheidell_at_secnap.net)
Date: 11/05/05

  • Next message: Kövesdán Gábor: "What happened with portaudit?"
    Date: Sat, 5 Nov 2005 08:09:13 -0500
    To: <freebsd-security@freebsd.org>
    
    

    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 >= 0);
    - int ret;

            if(readTimeout == 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 => 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= clamav
    -PORTVERSION= 0.87
    -PORTREVISION= 2
    +PORTVERSION= 0.87.1
     CATEGORIES= security
     MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
     MASTER_SITE_SUBDIR= 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) = dd0a12deb4f48f760fa1fcd378ae7c24 -SIZE
    (clamav-0.87.tar.gz) = 4273714
    +MD5 (clamav-0.87.1.tar.gz) = bf9f038edf0b6d5f76552e1b8d014b81 SIZE
    +(clamav-0.87.1.tar.gz) = 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

    -- 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.

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

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

    -- 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.
    _______________________________________________
    freebsd-security@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-security
    To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"


  • Next message: Kövesdán Gábor: "What happened with portaudit?"

    Relevant Pages