JDK-8000761 : Applet throws AccessControlException sporadically while reading user.home
  • Type: Backport
  • Backport of: JDK-7171399
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u27,7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-10-11
  • Updated: 2012-12-05
  • Resolved: 2012-10-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u10 b12Fixed
Description
FULL PRODUCT VERSION :
Java Plug-in 10.3.0.5
Using JRE version 1.7.0_03-b05 Java HotSpot(TM) Client VM
and
JRE version 1.7.0_04

ADDITIONAL OS VERSION INFORMATION :
Windows 7 32 bit

A DESCRIPTION OF THE PROBLEM :
I am running a applet and one of the class is reading  use.home (System.getProperty("user.home");)

This code is executing this code few times and  it is throwing AccessControlException on irregular interval .

It working most of the time and it fails sporadically and it lead to the application crash.

It is not reproducible with JRE1.6 and 1.5


REGRESSION.  Last worked in version 6u31


ERROR MESSAGES/STACK TRACES THAT OCCUR :
ava.security.AccessControlException: access denied ("java.util.PropertyPermission" "user.home" "read")
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
	at java.lang.System.getProperty(Unknown Source)
	at com.documentum.web.applet.ucfinvoker.LaunchRuntimeDelegate.init(Unknown Source)
	at com.documentum.web.applet.ucfinvoker.LaunchRuntime.init(Unknown Source)
	at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
 try
      {
         System.getProperty("user.home");
      
      }
      catch(AccessControlException securityEx)
      {
 
     }
---------- END SOURCE ----------
SHORT SUMMARY: When several signed applets are simultaneously loaded
  from the same web page, some of them may not get full permissions.
INDICATORS: Different kinds of AccessControlException's that are not
  supposed to be thrown for signed applets (for example, on reading
  "user.home" property, or on accessing a local file system).
TRIGGERS: The problem happens sporadically and have symptoms of
  a race condition with low-to-medium failure rate.
KNOWN WORKAROUND: Though there is no direct relation between this change
  and the problem's root cause, disabling the Java Deployment Cache helps
  to avoid the problem.
PRESENT SINCE: Introduction of plugin2, at least.
HOW TO VERIFY: There is no stand-alone test case for this issue.
  The customer verifies the provided binaries in their environment
  and informs us about the verification results.
REGRESSION: No.

Comments
Verified by customer. Have no test case to verify issue locally.
30-10-2012

Add SQE is ok to take it into 7u10.
16-10-2012

Sync from 7u7-b32 revision then in 7u9-b31 revision.
11-10-2012