Details
-
Bug
-
Resolution: Fixed
-
P2
-
7u51, 7u60, 8
-
b115
-
b119
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8033821 | 7u80 | Mark Sheppard | P2 | Resolved | Fixed | b01 |
JDK-8034283 | 7u65 | Mark Sheppard | P2 | Resolved | Fixed | b01 |
JDK-8029256 | 7u60 | Mark Sheppard | P2 | Resolved | Fixed | b02 |
JDK-8029071 | 7u55 | Mark Sheppard | P2 | Resolved | Fixed | b01 |
JDK-8029187 | 7u51 | Mark Sheppard | P2 | Closed | Fixed | b09 |
JDK-8029171 | 6u75 | Sean Coffey | P2 | Resolved | Fixed | b01 |
JDK-8029125 | 6u71 | Sean Coffey | P2 | Closed | Fixed | b09 |
JDK-8029126 | 5.0u65 | Sean Coffey | P2 | Resolved | Fixed | b01 |
JDK-8029188 | 5.0u61 | Sean Coffey | P2 | Closed | Fixed | b08 |
Description
import org.omg.CORBA.ORB;
import java.util.Properties;
public class Test {
public static void main(String[] args) {
Properties props = new Properties();
props.put("org.omg.CORBA.ORBClass",
"com.sun.corba.se.impl.orb.ORBImpl");
props.put("org.omg.CORBA.ORBSingletonClass",
"com.sun.corba.se.impl.orb.ORBSingleton");
ORB orb = ORB.init(args, props);
}
}
Now run this with a security manager:
$ java -Djava.security.manager Test
Exception in thread "main" org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.sun.corba.se.impl.orb.ORBImpl vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.ORB.create_impl(ORB.java:306)
at org.omg.CORBA.ORB.init(ORB.java:345)
at Test2.main(Test2.java:11)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.com.sun.corba.se.impl.orb")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1571)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:305)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at org.omg.CORBA.ORB.create_impl(ORB.java:304)
... 2 more
This is new behavior, in shipping JDK releases then this would run without throwing a security exception.
Attachments
Issue Links
- backported by
-
JDK-8029071 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8029126 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8029171 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8029256 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8033821 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8034283 ORB.init fails with SecurityException if properties select the JDK default ORB
- Resolved
-
JDK-8029125 ORB.init fails with SecurityException if properties select the JDK default ORB
- Closed
-
JDK-8029187 ORB.init fails with SecurityException if properties select the JDK default ORB
- Closed
-
JDK-8029188 ORB.init fails with SecurityException if properties select the JDK default ORB
- Closed
- relates to
-
JDK-8021257 com.sun.corba.se.** should be on restricted package list
- Closed