This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 852051 (CVE-2012-4681)

Summary: CVE-2012-4681 OpenJDK: beans insufficient permission checks, Java 7 0day (beans, 7162473)
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: ahughes, aph, bfreeman, cbuissar, chewi, daniell1, dbhole, djorm, fweimer, jlieskov, jvanek, kseifried, mcepl, mjw, omajid, ptisnovs, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=critical,public=20120827,reported=20120827,source=internet,cvss2=6.8/AV:N/AC:M/Au:N/C:P/I:P/A:P,rhel-5/java-1.7.0-openjdk=affected,rhel-6/java-1.7.0-openjdk=affected,rhel-5/java-1.7.0-oracle=affected,rhel-6/java-1.7.0-oracle=affected,rhel-6/java-1.7.0-ibm=affected,rhel-5/java-1.6.0-openjdk=notaffected,rhel-5/java-1.6.0-sun=notaffected,rhel-5/java-1.6.0-ibm=notaffected,rhel-6/java-1.6.0-openjdk=notaffected,rhel-6/java-1.6.0-sun=notaffected,rhel-6/java-1.6.0-ibm=notaffected,fedora-all/java-1.7.0-openjdk=affected,fedora-16/java-1.7.0-openjdk=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-19 04:43:47 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 852299, 852300, 852301, 852302, 852303, 852304, 852957, 852958, 854890, 854891, 856471    
Bug Blocks: 852098    

Description Tomas Hoger 2012-08-27 08:58:05 EDT
A 0-day flaw exploited in the wild has been reported to affect Java 7:

http://blog.fireeye.com/research/2012/08/zero-day-season-is-not-over-yet.html
http://pastie.org/4594319

This issue was confirmed to allow unsigned applet to bypass Java applet restrictions and run arbitrary code on users' systems.
Comment 1 Tomas Hoger 2012-08-27 09:09:03 EDT
Code execution was confirmed with the latest Oracle and IBM Java 7 web browser plugin.  IcedTea-Web using OpenJDK7 blocks this exploit by not allowing applet to change the SecurityManager (which is allowed in Oracle and IBM Java plugin).

Java 6 is currently not known to be affected.
Comment 3 Tomas Hoger 2012-08-27 10:11:28 EDT
Secunia: http://secunia.com/advisories/50133/
Comment 5 David Jorm 2012-08-27 21:49:16 EDT
This flaw allows an attacker to circumvent all restrictions applied by the Java security manager. The Java security manager is used to sandbox Java applets in web browsers, but is also used in a variety of other applications. For example, Tomcat can optionally use the Java security manager to apply restrictions to deployed applications. This flaw affects these uses of the Java security manager, not just browser plugins for viewing Java applets.
Comment 9 David Jorm 2012-08-28 03:37:10 EDT
This statement was last updated on Sep 19, 2012.

Statement:

This flaw allowed an attacker to circumvent all restrictions applied by the Java security manager. The Java security manager is used to sandbox Java applets in web browsers, but is also used in a variety of other applications.

Red Hat has tested the flaw and confirmed that it affected Java SE 7 provided by OpenJDK 7 (java-1.7.0-openjdk), Oracle Java SE 7 (java-1.7.0-oracle) and IBM Java SE 7 (java-1.7.0-ibm) as shipped with Red Hat Enterprise Linux 6. Updates correcting this issue were released for all affected packages.
Comment 10 Tomas Hoger 2012-08-28 09:13:21 EDT
Details of the flaw from Michael Schierl:

http://www.deependresearch.org/2012/08/java-7-vulnerability-analysis.html
Comment 12 Tomas Hoger 2012-08-28 10:22:05 EDT
(In reply to comment #1)
> IcedTea-Web using OpenJDK7 blocks this exploit by not allowing applet to
> change the SecurityManager (which is allowed in Oracle and IBM Java plugin).

Other attacks that do not try to change SecurityManager may be used against IcedTea-Web using OpenJDK7.  Note that IcedTea-Web browser plugin as shipped with Red Hat Enterprise Linux 6 currently only used OpenJDK6.
Comment 13 Tomas Hoger 2012-08-28 11:46:45 EDT
Mozilla bug requesting blocking affected Java plugin versions:

https://bugzilla.mozilla.org/show_bug.cgi?id=785837
Comment 16 Tomas Hoger 2012-08-28 14:31:03 EDT
Another reference with relevant technical details:

http://www.alertlogic.com/java-7-classfinder-restricted-package-bypass/
Comment 19 David Jorm 2012-08-30 01:32:23 EDT
Created java-1.7.0-openjdk tracking bugs for this issue

Affects: fedora-16 [bug 852957]
Affects: fedora-17 [bug 852958]
Comment 21 Tomas Hoger 2012-08-30 03:38:42 EDT
According to the following post, issues used by this exploit were reported to upstream in April:

http://seclists.org/fulldisclosure/2012/Aug/336
Comment 22 Kurt Seifried 2012-08-30 04:21:01 EDT
Another reference with relevant technical details:

http://www.h-online.com/security/features/The-new-Java-0day-examined-1677789.html
Comment 26 Kurt Seifried 2012-08-30 15:18:06 EDT
IcedTea-Web using OpenJDK7 blocks this exploit by not allowing applet to change the SecurityManager (which is allowed in Oracle and IBM Java plugin). However it should be noted that:

"But there are other ways to abuse this bug to circumvent security restrictions in a more subtle way, so patching is still very recommended."

http://gnu.wildebeest.org/blog/mjw/2012/08/30/java-bug-cve-2012-4681/
Comment 27 Tomas Hoger 2012-08-31 03:21:35 EDT
Upstream commit, as applied to IcedTea 7 2.3 repositories:

http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk/rev/8a226f6a768a

This replaces previous patch mentioned in comment #17.  The two patches are identical except of the formatting.
Comment 29 Tomas Hoger 2012-08-31 05:53:36 EDT
OpenJDK7 repositories commit:

http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/2c58f14f60c7
Comment 30 errata-xmlrpc 2012-09-03 09:01:42 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:1223 https://rhn.redhat.com/errata/RHSA-2012-1223.html
Comment 32 errata-xmlrpc 2012-09-04 03:05:42 EDT
This issue has been addressed in following products:

  Supplementary for Red Hat Enterprise Linux 6

Via RHSA-2012:1225 https://rhn.redhat.com/errata/RHSA-2012-1225.html
Comment 35 errata-xmlrpc 2012-09-18 18:53:12 EDT
This issue has been addressed in following products:

  Supplementary for Red Hat Enterprise Linux 6

Via RHSA-2012:1289 https://rhn.redhat.com/errata/RHSA-2012-1289.html
Comment 36 David Jorm 2012-09-19 04:50:26 EDT
This flaw affects users of JBoss middleware products who are using Java 7 and relying on the Java security manager to control the privileges of untrusted deployed applications. A malicious deployed application could use this flaw to circumvent the controls applied by the Java security manager. Affected JBoss middleware users are advised to use a patched implementation of Java 7. JBoss middleware users who are not using Java 7 or are not relying on the Java security manager are not affected by this flaw.