[1407] in java-interest
private native dynamic methods unprotected?
daemon@ATHENA.MIT.EDU (sbk@netcom.com)
Fri Sep 1 02:44:02 1995
From: sbk@netcom.com
To: java-interest@java.sun.com
Date: Thu, 31 Aug 1995 20:34:49 -0700 (PDT)
Cc: sbk@netcom.com ()
In the solaris alpha 3 version I have, private native methods that are
dynamically linkable can be called outside of their class.
For instance, knowing the method->function mangling convention and
examining the Socket.java class, one can invoke a private method in
this class. The call still fails, but it is because of different
reasons, not the unsatisfied link exception that one might expect. I'm
wondering if there is a potential security breach?
% uname -a SunOS mizar 5.4 generic sun4m sparc
% cat net_Socket.java
import net.InetAddress;
import java.util.*;
public final class net_Socket
{
public native void connectUnchecked(InetAddress dest, int port);
public static void main(String argv[])
{
net_Socket s = new net_Socket();
s.connectUnchecked(InetAddress.getByName(InetAddress.localHostName),7);
}
}
% javac net_Socket
net.SocketException Invalid argument
at net_Socket.main(net_Socket.java:10)
%
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com