Bug 594497 (CVE-2010-0831, CVE-2010-2322)

Summary: CVE-2010-0831 CVE-2010-2322 fastjar: directory traversal vulnerabilities
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bressers, dbhole, jakub, mnowak, mpolacek, rruss, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20100606,reported=20100518,source=vendor-sec,cvss2=2.6/AV:N/AC:H/Au:N/C:N/I:P/A:N,rhel-4/gcc=wontfix,rhel-4/gcc4=wontfix,rhel-5/gcc=affected,rhel-5/gcc44=notaffected,rhel-6/gcc=notaffected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-22 03:15:53 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 601815, 601823, 640697, 640698, 640699    
Bug Blocks:    
Attachments:
Description Flags
script to test for the existence of CVE-2010-0831 and CVE-2006-3619 in jar/fastjar
none
patch form Dan to fix the issue in fastjar none

Description Vincent Danen 2010-05-20 16:39:22 EDT
Dan Rosenberg reported a directory traversal flaw in fastjar that allows an attacker, who is able to convince a victim to extract a malicious .jar file, to overwrite arbitrary files on disk without prompting the victim.  The files to be overwritten must be writable by the user extracting the .jar file.

This issue has been assigned the name CVE-2010-0831, and it is possible that it is due to an incomplete fix for CVE-2006-3619 (bug #198912).

Upon investigation, the same problem exists in the jar archiver as provided by OpenJDK and java-1.4.2-gcj-compat.
Comment 1 Vincent Danen 2010-05-20 16:47:57 EDT
The jar program as provided by java-1.4.2-gcj-compat-devel in Red Hat Enterprise Linux 4 and 5 is also vulnerable to a similar issue as CVE-2006-3619, that was actually given the name CVE-2005-1080.  I'm not sure if MITRE will assign another CVE for this issue since the original issue received two different CVE names, despite it being the same directory traversal flaw.

I've written up a script to test if the vulnerability is present in jar and fastjar.
Comment 2 Vincent Danen 2010-05-20 16:49:07 EDT
Created attachment 415508 [details]
script to test for the existence of CVE-2010-0831 and CVE-2006-3619 in jar/fastjar
Comment 4 Vincent Danen 2010-05-20 17:01:33 EDT
Statement:

The Red Hat Security Response Team has rated this issue as having low security impact, a future update may address this flaw.
Comment 5 Vincent Danen 2010-05-20 17:06:59 EDT
Created attachment 415514 [details]
patch form Dan to fix the issue in fastjar
Comment 9 Vincent Danen 2010-06-08 12:51:14 EDT
This is now public: https://launchpad.net/bugs/540575
Comment 12 Vincent Danen 2010-06-08 13:14:21 EDT
Created gcc tracking bugs for this issue

Affects: fedora-all [bug 601823]
Comment 15 Vincent Danen 2010-06-08 15:43:26 EDT
I've asked for clarification on the jar part of this bug on oss-security:
http://www.openwall.com/lists/oss-security/2010/06/08/2
Comment 16 Vincent Danen 2010-06-18 16:21:26 EDT
MITRE has assigned another CVE name to this flaw (CVE-2010-2322) with the following descriptions:

Name: CVE-2010-0831

Directory traversal vulnerability in the extract_jar function in
jartool.c in FastJar 0.98 allows remote attackers to create or
overwrite arbitrary files via a .. (dot dot) in a non-initial pathname
component in a filename within a .jar archive, a related issue to
CVE-2005-1080.  NOTE: this vulnerability exists because of an
incomplete fix for CVE-2006-3619.

Name: CVE-2010-2322

Absolute path traversal vulnerability in the extract_jar function in
jartool.c in FastJar 0.98 allows remote attackers to create or
overwrite arbitrary files via a full pathname for a file within a .jar
archive, a related issue to CVE-2010-0831.  NOTE: this vulnerability
exists because of an incomplete fix for CVE-2006-3619.
Comment 17 Vincent Danen 2010-06-21 11:59:14 EDT
A separate bug has been filed for jar (bug #606442, CVE-2005-1080).  This bug is for fastjar in gcc only.
Comment 18 Fedora Update System 2010-06-25 06:45:36 EDT
gcc-4.4.4-9.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gcc-4.4.4-9.fc13
Comment 19 Fedora Update System 2010-06-30 15:15:05 EDT
gcc-4.4.4-10.fc12,libtool-2.2.6-18.fc12.1 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gcc-4.4.4-10.fc12,libtool-2.2.6-18.fc12.1
Comment 20 Fedora Update System 2010-07-05 18:05:45 EDT
gcc-4.4.4-10.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2010-07-06 13:17:35 EDT
gcc-4.4.4-10.fc12, libtool-2.2.6-18.fc12.1 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 32 errata-xmlrpc 2011-01-13 18:58:22 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:0025 https://rhn.redhat.com/errata/RHSA-2011-0025.html