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.
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.
Created attachment 415508 [details] script to test for the existence of CVE-2010-0831 and CVE-2006-3619 in jar/fastjar
Statement: The Red Hat Security Response Team has rated this issue as having low security impact, a future update may address this flaw.
Created attachment 415514 [details] patch form Dan to fix the issue in fastjar
This is now public: https://launchpad.net/bugs/540575
Created gcc tracking bugs for this issue Affects: fedora-all [bug 601823]
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
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.
A separate bug has been filed for jar (bug #606442, CVE-2005-1080). This bug is for fastjar in gcc only.
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
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
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.
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.
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