Page 1 of 1

Segmentation fault occurred when on grsec 2.6.34.6 + jdk

PostPosted: Tue Sep 25, 2012 10:22 pm
by sunandy3
Dear,

I am not sure whether it is a real way to post my problem by email, but the ensured thing is that I met a tough problem when having grsec kernel + Jdk1.6 + KeyGen.java in attachment. When running my java program, there will be generated a message into /var/log/messages. Below are the actual messages.

Would you please guide me how to tune the system to reduce such error happened? Besides, will this problem impact the system performance?
Very appreciated if you can response me.

Sep 26 10:06:57 1-12 kernel: : grsec: From 127.0.0.6: Segmentation fault occurred at (null) in /data/opt/jdk1.6.0_16-linux-amd64/bin/java[java:21218] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
Sep 26 10:07:00 1-12 kernel: : grsec: From 127.0.0.6: Segmentation fault occurred at (null) in /data/opt/jdk1.6.0_16-linux-amd64/bin/java[java:21219] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
Sep 26 10:07:03 1-12 kernel: : grsec: From 127.0.0.6: Segmentation fault occurred at (null) in /data/opt/jdk1.6.0_16-linux-amd64/bin/java[java:21226] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
-------------------------------------
-bash-3.2# uname -a
Linux 1-12.mavenir1.com 2.6.34.6-grsec-WR4.0.0.0_cgl #1 SMP PREEMPT Tue Sep 11 13:31:14 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux

-bash-3.2# java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

I also tried other early versions of JDK like 1.4, 1.5. The same problem shall be occurred.

Re: Segmentation fault occurred when on grsec 2.6.34.6 + jdk

PostPosted: Wed Sep 26, 2012 9:20 am
by PaX Team
is your PaX configuration consistent with the PaX flags you set on java?

Re: Segmentation fault occurred when on grsec 2.6.34.6 + jdk

PostPosted: Wed Sep 26, 2012 10:34 am
by sunandy3
Thanks for your response.
Would you please guide me how to check "is your PaX configuration consistent with the PaX flags you set on java?" in my system? Forgive me I am a freshman on this OS.

Re: Segmentation fault occurred when on grsec 2.6.34.6 + jdk

PostPosted: Wed Sep 26, 2012 10:38 am
by sunandy3
Do you mean this?

-bash-3.2# paxctl -v /data/opt/jdk1.6.0_16-linux-amd64/bin/java
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team <pageexec@freemail.hu>

- PaX flags: -p-s-m-x-e-r [/data/opt/jdk1.6.0_16-linux-amd64/bin/java]
PAGEEXEC is disabled
SEGMEXEC is disabled
MPROTECT is disabled
RANDEXEC is disabled
EMUTRAMP is disabled
RANDMMAP is disabled

Re: Segmentation fault occurred when on grsec 2.6.34.6 + jdk

PostPosted: Wed Sep 26, 2012 11:05 am
by PaX Team
sunandy3 wrote:Do you mean this?

-bash-3.2# paxctl -v /data/opt/jdk1.6.0_16-linux-amd64/bin/java
- PaX flags: -p-s-m-x-e-r [/data/opt/jdk1.6.0_16-linux-amd64/bin/java]
yes i meant this one and it seems that you should be fine as far as PaX is concerned. you should also try a newer kernel, 2.6.34 is very old and we no longer support it.