From owner-freebsd-ports@FreeBSD.ORG Sat Nov 5 13:09:19 2005 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9176F16A41F; Sat, 5 Nov 2005 13:09:19 +0000 (GMT) (envelope-from scheidell@secnap.net) Received: from 0.mail.spammertrap.net (0.mail.spammertrap.net [204.89.241.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D97943D58; Sat, 5 Nov 2005 13:09:16 +0000 (GMT) (envelope-from scheidell@secnap.net) Received: from localhost (localhost [127.0.0.1]) by 0.mail.spammertrap.net (Postfix) with ESMTP id 1119218F3E7; Sat, 5 Nov 2005 08:09:16 -0500 (EST) Received: from secnap2.secnap.com (secnap2.secnap.com [204.89.241.128]) by 0.mail.spammertrap.net (Postfix) with ESMTP id 6891218F3E0; Sat, 5 Nov 2005 08:09:13 -0500 (EST) Received: from 0.mail.spammertrap.net ([204.89.241.173]) by secnap2.secnap.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 4 Nov 2005 15:16:26 -0500 Received: from localhost (localhost [127.0.0.1]) by 0.mail.spammertrap.net (Postfix) with ESMTP id 90D8218F3E4 for ; Fri, 4 Nov 2005 15:16:26 -0500 (EST) Received: from outgoing.securityfocus.com (outgoing.securityfocus.com [205.206.231.26]) by 0.mail.spammertrap.net (Postfix) with ESMTP id 3930D18F3E0 for ; Fri, 4 Nov 2005 15:16:20 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Received: from outgoing.securityfocus.com by outgoing.securityfocus.com via smtpd (for 0.mail.spammertrap.net [204.89.241.173]) with ESMTP; Fri, 4 Nov 2005 12:16:20 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Received: from lists2.securityfocus.com (lists2.securityfocus.com [205.206.231.20]) by outgoing2.securityfocus.com (Postfix) with QMQP id 8E484146106; Fri, 4 Nov 2005 11:35:46 -0700 (MST) Received: (qmail 5051 invoked from network); 4 Nov 2005 11:10:45 -0000 content-class: urn:content-classes:message Date: Sat, 5 Nov 2005 08:09:13 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Freebsd port issue: ZDI-05-002: Clam Antivirus Remote Code Execution Thread-Index: AcXhfKKGdaPvPjHiT/6d4Ee70BRFQg== From: "Michael Scheidell" To: X-Virus-Scanned: SpammerTrap(tm) SME-250 1.45 at spammertrap.net X-Spam-Status: No, score=-6.401 tagged_above=-999 required=6.9 tests=[AWL=-0.003, BAYES_00=-2.599, J_CHICKENPOX_64=0.6, J_CHICKENPOX_84=0.6, LOCAL_RCVD=-5, UNPARSEABLE_RELAY=0.001] X-Spam-Score: -6.401 X-Spam-Level: Cc: ports@freebsd.org, rob@debank.tv Subject: Freebsd port issue: ZDI-05-002: Clam Antivirus Remote Code Execution X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 13:09:19 -0000 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.