Bug 129301 - [vuxml] [patch] devel/p5-File-Path: completely fix CVE-2005-0448
Summary: [vuxml] [patch] devel/p5-File-Path: completely fix CVE-2005-0448
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: chinsan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-30 16:40 UTC by Eygene Ryabinkin
Modified: 2009-01-03 12:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eygene Ryabinkin 2008-11-30 16:40:01 UTC
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

Fix: The following patch updates the port with the proper fix.



The following VuXML entry should be evaluated and added:
  <vuln vid="13b0c8c8-bee0-11dd-a708-001fc66e7203">
    <topic>p5-File-Path -- rmtree allows creation of setuid files</topic>
    <affects>
      <package>
        <name>p5-File-Path</name>
        <range><lt>2.07_1</lt></range>
      </package>
    </affects>
    <description>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>Jan Lieskovsky reports:</p>
        <blockquote
          cite="http://www.openwall.com/lists/oss-security/2008/11/28/1">
          <p>perl-File-Path rmtree race condition (CVE-2005-0448 was
          assigned to address this)</p>
          <p>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.</p>
        </blockquote>
      </body>
    </description>
    <references>
      <cvename>CVE-2005-0448</cvename>
      <mlist>http://www.openwall.com/lists/oss-security/2008/11/28/1</mlist>
      <mlist>http://www.gossamer-threads.com/lists/perl/porters/233699#233699</mlist>
      <url>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905</url>
    </references>
    <dates>
      <discovery>28-11-2008</discovery>
      <entry>TODAY</entry>
    </dates>
  </vuln>
--- vuln.xml ends here -----Sc9MIVPEw7KAEwGwyqlgey5Vx1rbffuXlovzlDgoAK2nKRaL
Content-Type: text/plain; name="p5-File-Path-completely-fix-CVE-2008-0448.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="p5-File-Path-completely-fix-CVE-2008-0448.diff"

From 6a3342fd4e12d3b3de24d6b0bdaa98ed9aac08e3 Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
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 <rea-fbsd@codelabs.ru>
---
 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
How-To-Repeat: 
Read the reference above and
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-11-30 16:40:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->chinsan

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2009-01-03 12:06:24 UTC
chinsan     2009-01-03 12:06:08 UTC

  FreeBSD ports repository

  Modified files:
    devel/p5-File-Path   Makefile 
  Added files:
    devel/p5-File-Path/files 
                             patch-incomplete-fix-for-CVE-2008-0448 
  Log:
  - Completely fix CVE-2005-0448
  
  PR:             ports/129301
  Submitted by:   Eygene Ryabinkin <rea-fbsd@codelabs.ru>
  
  Revision  Changes    Path
  1.3       +1 -0      ports/devel/p5-File-Path/Makefile
  1.1       +11 -0     ports/devel/p5-File-Path/files/patch-incomplete-fix-for-CVE-2008-0448 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-01-03 12:07:08 UTC
chinsan     2009-01-03 12:06:45 UTC

  FreeBSD ports repository

  Modified files:
    security/vuxml       vuln.xml 
  Log:
  - Completely fix CVE-2005-0448
  
  PR:             ports/129301
  Submitted by:   Eygene Ryabinkin <rea-fbsd@codelabs.ru>
  
  Revision  Changes    Path
  1.1801    +34 -1     ports/security/vuxml/vuln.xml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 chinsan freebsd_committer freebsd_triage 2009-01-03 12:09:04 UTC
State Changed
From-To: open->closed

Committed, thanks.