[kaffe] class loading security/compatibility concerns

gonzo Robert.N.Gonzalez at williams.edu
Thu Aug 1 08:14:19 PDT 2002


if i create a file A.java in package java and try to run it on the Sun
java VM i get:
	java.lang.SecurityException: Prohibited package name: java

i'm currently working on rewriting large sections of the verifier patch
(almost done with pass 2) and am trying to keep consistent with this
behavior.  however, there doesn't seem any way to tell whether a class
loaded by the system class loader is a system class (part of kaffe's
internal library or something on the CLASSPATH, which is presumably
trusted) or a user class, which needs to be verified for safety.

(note - classes loaded by custom class loaders can legally be in a package
called java so we only need worry about the case where class->loader ==
NULL)

that is, if i discover that a class is in package "java" i need a way to
tell whether it's allowed to be in a package called java.


in a related note, if there were some way to tell whether a class in 
package java or kaffe is a trusted system class, we can skip verification
all together which would make initial loading of the VM somewhat faster
(for HelloWorld roughly 50 classes get loaded).  furthermore, some of the
verification necessary for pass 2 actually breaks the VM (i'm looking
into why...it works safely on all external class files) so i really do
need to skip the internal system library :)


cheers,
~rob





More information about the kaffe mailing list