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:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-22 07:15:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
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 20:39:22 UTC
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 20:47:57 UTC
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 20:49:07 UTC
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 21:01:33 UTC
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 21:06:59 UTC
Created attachment 415514 [details]
patch form Dan to fix the issue in fastjar

Comment 9 Vincent Danen 2010-06-08 16:51:14 UTC
This is now public: https://launchpad.net/bugs/540575

Comment 12 Vincent Danen 2010-06-08 17:14:21 UTC
Created gcc tracking bugs for this issue

Affects: fedora-all [bug 601823]

Comment 15 Vincent Danen 2010-06-08 19:43:26 UTC
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 20:21:26 UTC
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 15:59:14 UTC
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 10:45:36 UTC
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 19:15:05 UTC
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 22:05:45 UTC
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 17:17:35 UTC
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 23:58:22 UTC
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