Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
enable java execution in pax?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Vyeperman
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2003
Posts: 89

PostPosted: Sat Apr 02, 2005 9:05 pm    Post subject: enable java execution in pax? Reply with quote

I'm trying to execute a script/program that was completely written in java. After realizing the program wasn't running right I checked /var/log/messages and found something interesting.

Code:

Apr  2 13:05:07 Neji PAX: From 68.7.245.143: execution attempt in: /opt/sun-jdk-1.4.2.07/jre/lib/i386/client/libjvm.so, 23728000-23744000 003fd000
Apr  2 13:05:07 Neji PAX: terminating task: /opt/sun-jdk-1.4.2.07/bin/java(java):8764, uid/euid: 0/0, PC: 23732204, SP: 5ae2f604
Apr  2 13:05:07 Neji PAX: bytes at PC: 68 7f 02 00 00 d9 6c 24 00 58 c3 90 cc cc cc cc 00 80 01 00
Apr  2 13:05:07 Neji PAX: bytes at SP: 23588347 23740d50 5ae2f62c 23584745 00000001 23740d50 00003000 0000e000 0000e000 00003000 5ae2f63c 2358731c 08067408 23740d50 5ae2f6f4 235cecd5 08067408 23740d50 234f38b4 5ae317d0


I'm not to familiar with how to configure grsecurity in my kernel I had a little help from a friend getting it configured, but I would like to keep pax if possible, just enable java support. Can this be done?
_________________
-Vyeperman
Back to top
View user's profile Send private message
Vyeperman
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2003
Posts: 89

PostPosted: Sat Apr 02, 2005 11:44 pm    Post subject: Reply with quote

Ok I've learned that I need to use paxctl with java to get it to work but I'm not sure what option to use, my guess is it's one of the exec ones since it appears to be an exec issue.

Code:

usage: paxctl <options> <files>options:       
-p: disable PAGEEXEC        -P: enable PAGEEXEC        -e: disable EMUTRMAP         
-E: enable EMUTRMAP       -m: disable MPROTECT      -M: enable MPROTECT       
-r: disable RANDMMAP        -R: enable RANDMMAP      -x: disable RANDEXEC           
-X: enable RANDEXEC        -s: disable SEGMEXEC        -S: enable SEGMEXEC

_________________
-Vyeperman
Back to top
View user's profile Send private message
mxc
Guru
Guru


Joined: 05 Mar 2003
Posts: 442
Location: South Africa

PostPosted: Mon Apr 25, 2005 4:41 pm    Post subject: Reply with quote

Did you get this fixed in the end? If so what did you do?

thanks
_________________
http://www.CyberDesigns.co.za
http://www.Jumpingbean.co.za
Back to top
View user's profile Send private message
dryadcito
Apprentice
Apprentice


Joined: 08 Oct 2004
Posts: 170
Location: Switzerland

PostPosted: Mon Apr 25, 2005 5:01 pm    Post subject: Reply with quote

You should use

chpax -pemrxs /opt/*-jdk-*/{jre,}/bin/*

See http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#paxjava


You also can emerge chpax and add chpax to the default runlevel. It will set the right flags for some other apps. like xmms and Xorg. It's configuration file is /etc/conf.d/chpax , but I think you won't need to edit it.

If you emerge ( or re-emerge ) xmms, java or any other program needing special flags you must run manually "/etc/init.d/chpax start" because once it's been run it doesn't do anything ( there is no daemon ) or reboot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum