From owner-freebsd-vuxml@FreeBSD.ORG Sun Nov 30 16:30:54 2008 Return-Path: Delivered-To: freebsd-vuxml@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A80DC10656E6; Sun, 30 Nov 2008 16:30:54 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 591838FC14; Sun, 30 Nov 2008 16:30:54 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:To:Subject:From:Reply-To:Cc:X-send-pr-version:X-GNATS-Notify:Message-Id:Date; b=dZmgYyxaAkeNsjNhkj84ePINpjy9qxqGBU78w5G3D0FYtukfLYOYrQQytp/GGbh/HixyA7vsBiRXnM7hn4MO8bsZWadr9LHo2GaFGvy0i1P1KKPdItTxMb2gIFkWay7SNuF8F2aBJ8b3cnt7oEx04G5OHN57dw2aebXS6dJKyiI=; Received: from phoenix.codelabs.ru (ppp85-141-162-16.pppoe.mtu-net.ru [85.141.162.16]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1L6pC9-00065H-CD; Sun, 30 Nov 2008 19:30:53 +0300 To: FreeBSD-gnats-submit@freebsd.org From: Eygene Ryabinkin X-send-pr-version: 3.113 X-GNATS-Notify: chinsan@FreeBSD.org Message-Id: <20081130150307.7429CB801E@phoenix.codelabs.ru> Date: Sun, 30 Nov 2008 18:03:07 +0300 (MSK) X-Mailman-Approved-At: Sun, 30 Nov 2008 16:52:00 +0000 Cc: freebsd-vuxml@freebsd.org Subject: [vuxml] [patch] devel/p5-File-Path: completely fix CVE-2005-0448 X-BeenThere: freebsd-vuxml@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Documenting security issues in VuXML List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 16:30:54 -0000 >Submitter-Id: current-users >Originator: Eygene Ryabinkin >Organization: Code Labs >Confidential: no >Synopsis: [vuxml] [patch] devel/p5-File-Path: completely fix CVE-2005-0448 >Severity: critical >Priority: high >Category: ports >Class: sw-bug >Release: FreeBSD 7.1-PRERELEASE amd64 >Environment: System: FreeBSD 7.1-PRERELEASE amd64 >Description: It was discovered that Perl's File::Path.pm is still vulnerable to CVE-2005-0448: http://www.openwall.com/lists/oss-security/2008/11/28/1 >How-To-Repeat: Read the reference above and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905 >Fix: The following patch updates the port with the proper fix. --- p5-File-Path-completely-fix-CVE-2008-0448.diff begins here --- >From 6a3342fd4e12d3b3de24d6b0bdaa98ed9aac08e3 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Sun, 30 Nov 2008 16:04:26 +0300 Original issue is documented at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905 Current issue (incomplete fix) is documented at http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=85;filename=sid_fix_file_path;att=2;bug=286905 Signed-off-by: Eygene Ryabinkin --- devel/p5-File-Path/Makefile | 1 + .../files/patch-incomplete-fix-for-CVE-2008-0448 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 devel/p5-File-Path/files/patch-incomplete-fix-for-CVE-2008-0448 diff --git a/devel/p5-File-Path/Makefile b/devel/p5-File-Path/Makefile index 769198a..131df52 100644 --- a/devel/p5-File-Path/Makefile +++ b/devel/p5-File-Path/Makefile @@ -7,6 +7,7 @@ PORTNAME= File-Path PORTVERSION= 2.07 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff --git a/devel/p5-File-Path/files/patch-incomplete-fix-for-CVE-2008-0448 b/devel/p5-File-Path/files/patch-incomplete-fix-for-CVE-2008-0448 new file mode 100644 index 0000000..2cdcf25 --- /dev/null +++ b/devel/p5-File-Path/files/patch-incomplete-fix-for-CVE-2008-0448 @@ -0,0 +1,13 @@ +Adopted from (took second hunk): http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=85;filename=sid_fix_file_path;att=2;bug=286905 + +--- Path.pm.orig 2008-11-30 15:00:37.000000000 +0300 ++++ Path.pm 2008-11-30 15:02:17.000000000 +0300 +@@ -333,7 +333,7 @@ + } + else { + _error($arg, "cannot remove directory", $canon); +- if (!chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) ++ if ($Force_Writeable && !chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) + ) { + _error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon); + } -- 1.6.0.4 --- p5-File-Path-completely-fix-CVE-2008-0448.diff ends here --- The following VuXML entry should be evaluated and added: --- vuln.xml begins here --- p5-File-Path -- rmtree allows creation of setuid files p5-File-Path 2.07_1

Jan Lieskovsky reports:

perl-File-Path rmtree race condition (CVE-2005-0448 was assigned to address this)

This vulnerability was fixed in 5.8.4-7 but re-introduced in 5.8.8-1. It's also present in File::Path 2.xx, up to and including 2.07 which has only a partial fix.

CVE-2005-0448 http://www.openwall.com/lists/oss-security/2008/11/28/1 http://www.gossamer-threads.com/lists/perl/porters/233699#233699 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905 28-11-2008 TODAY
--- vuln.xml ends here ---