[Bug libgcj/20704] CNI code is called/loaded without any security checks

2016-09-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20704

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrew Pinski  ---
Closing as won't fix as libgcj (and the java front-end) has been removed from
the trunk.

[Bug libgcj/20704] CNI code is called/loaded without any security checks

2005-03-31 Thread mckinlay at redhat dot com

--- Additional Comments From mckinlay at redhat dot com  2005-03-31 19:01 
---
I'm not sure that this should really be considered a bug. loadLibrary() must
obviously be a privileged function because arbritary code could be loaded by
calling it (possibly from an insecure context), but having/calling a CNI method
does not in itself cause anything to be loaded. A CNI method implementation must
already be loaded by being explicitly linked into an application binary.

To put it another way: is there a way that insecure bytecode can actually turn
this into an exploit?

Perhaps some kind of validity check is needed at link time to ensure that native
method declarations in insecure code do not link against an inappropriate native
method (for example, make sure that insecure classes cannot call themselves
gnu.foo.Whatever and get linked to a private CNI method implementation in
another class of the same name).

In any case, checking the loadLibrary permission is the wrong approach because
there is no library actually being loaded. The correct behaviour would be to
simply not link the method if something isn't right, resulting in an
UnsatisfiedLinkError.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20704


[Bug libgcj/20704] CNI code is called/loaded without any security checks

2005-03-31 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-31 
17:30 ---
Confirmed.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Component|java|libgcj
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-03-31 17:30:04
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20704