Java 1.4.2 + grsec + chpax = SIG 11!
Posted: Sun Dec 21, 2003 2:08 pm
I know this has been discussed, but I still cannot get any love from java. Perhaps this should be in a FAQ or something. I've tried everything I could read in this forum. I am using grsec for kernel 2.4.23 and JDK-1.4.2. Here is my kernel conf:
--- BEGIN KERNEL CONF ---
#
# Grsecurity
#
CONFIG_GRKERNSEC=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_SHA256=y
# CONFIG_GRKERNSEC_LOW is not set
# CONFIG_GRKERNSEC_MID is not set
# CONFIG_GRKERNSEC_HI is not set
CONFIG_GRKERNSEC_CUSTOM=y
#
# Address Space Protection
#
# CONFIG_GRKERNSEC_PAX_NOEXEC is not set
CONFIG_GRKERNSEC_PAX_ASLR=y
#CONFIG_GRKERNSEC_PAX_RANDUSTACK is not set
CONFIG_GRKERNSEC_PAX_RANDMMAP=y
CONFIG_GRKERNSEC_KMEM=y
# CONFIG_GRKERNSEC_IO is not set
CONFIG_GRKERNSEC_PROC_MEMMAP=y
CONFIG_GRKERNSEC_HIDESYM=y
#
# ACL options
#
# CONFIG_GRKERNSEC_ACL_HIDEKERN is not set
CONFIG_GRKERNSEC_ACL_MAXTRIES=3
CONFIG_GRKERNSEC_ACL_TIMEOUT=30
#
# Filesystem Protections
#
CONFIG_GRKERNSEC_PROC=y
# CONFIG_GRKERNSEC_PROC_USER is not set
CONFIG_GRKERNSEC_PROC_USERGROUP=y
CONFIG_GRKERNSEC_PROC_GID=10
# CONFIG_GRKERNSEC_PROC_ADD is not set
# CONFIG_GRKERNSEC_LINK is not set
CONFIG_GRKERNSEC_FIFO=y
CONFIG_GRKERNSEC_CHROOT=y
CONFIG_GRKERNSEC_CHROOT_MOUNT=y
CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
CONFIG_GRKERNSEC_CHROOT_PIVOT=y
CONFIG_GRKERNSEC_CHROOT_CHDIR=y
# CONFIG_GRKERNSEC_CHROOT_CHMOD is not set
# CONFIG_GRKERNSEC_CHROOT_FCHDIR is not set
CONFIG_GRKERNSEC_CHROOT_MKNOD=y
# CONFIG_GRKERNSEC_CHROOT_SHMAT is not set
CONFIG_GRKERNSEC_CHROOT_UNIX=y
# CONFIG_GRKERNSEC_CHROOT_FINDTASK is not set
# CONFIG_GRKERNSEC_CHROOT_NICE is not set
CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
# CONFIG_GRKERNSEC_CHROOT_CAPS is not set
#
# Kernel Auditing
#
CONFIG_GRKERNSEC_AUDIT_GROUP=y
CONFIG_GRKERNSEC_AUDIT_GID=1007
# CONFIG_GRKERNSEC_EXECLOG is not set
CONFIG_GRKERNSEC_RESLOG=y
CONFIG_GRKERNSEC_CHROOT_EXECLOG=y
# CONFIG_GRKERNSEC_AUDIT_CHDIR is not set
# CONFIG_GRKERNSEC_AUDIT_MOUNT is not set
# CONFIG_GRKERNSEC_AUDIT_IPC is not set
CONFIG_GRKERNSEC_SIGNAL=y
CONFIG_GRKERNSEC_FORKFAIL=y
CONFIG_GRKERNSEC_TIME=y
#
# Executable Protections
#
CONFIG_GRKERNSEC_EXECVE=y
CONFIG_GRKERNSEC_DMESG=y
CONFIG_GRKERNSEC_RANDPID=y
CONFIG_GRKERNSEC_TPE=y
CONFIG_GRKERNSEC_TPE_ALL=y
CONFIG_GRKERNSEC_TPE_GID=1005
#
# Network Protections
#
CONFIG_GRKERNSEC_RANDNET=y
CONFIG_GRKERNSEC_RANDISN=y
CONFIG_GRKERNSEC_RANDID=y
CONFIG_GRKERNSEC_RANDSRC=y
CONFIG_GRKERNSEC_RANDRPC=y
CONFIG_GRKERNSEC_SOCKET=y
CONFIG_GRKERNSEC_SOCKET_ALL=y
CONFIG_GRKERNSEC_SOCKET_ALL_GID=1004
CONFIG_GRKERNSEC_SOCKET_CLIENT=y
CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=1003
CONFIG_GRKERNSEC_SOCKET_SERVER=y
CONFIG_GRKERNSEC_SOCKET_SERVER_GID=1002
#
# Sysctl support
#
CONFIG_GRKERNSEC_SYSCTL=y
#
# Logging options
#
CONFIG_GRKERNSEC_FLOODTIME=10
CONFIG_GRKERNSEC_FLOODBURST=4
--- END KERNEL CONF ---
And I've tried all the chpax options on /usr/java/j2sdk1.4.2_01/bin/java, but I just get this:
--- BEGIN JAVA UGLINESS ---
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
08048000-0804e000 r-xp 00000000 08:05 702664 /usr/java/j2sdk1.4.2_01/bin/java
0804e000-0804f000 rw-p 00005000 08:05 702664 /usr/java/j2sdk1.4.2_01/bin/java
40000000-40015000 r-xp 00000000 08:03 354219 /lib/ld-2.3.2.so
40015000-40016000 rw-p 00015000 08:03 354219 /lib/ld-2.3.2.so
40016000-4001e000 r-xp 00000000 08:05 1257969 /usr/java/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so
4001e000-4001f000 rw-p 00007000 08:05 1257969 /usr/java/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so
4001f000-40023000 rw-s 00000000 08:03 129080 /tmp/hsperfdata_root/968
40024000-40031000 r-xp 00000000 08:03 418502 /lib/tls/libpthread-0.60.so
40031000-40032000 rw-p 0000c000 08:03 418502 /lib/tls/libpthread-0.60.so
40035000-40037000 r-xp 00000000 08:03 354128 /lib/libdl-2.3.2.so
40037000-40038000 rw-p 00001000 08:03 354128 /lib/libdl-2.3.2.so
40038000-4016a000 r-xp 00000000 08:03 418732 /lib/tls/libc-2.3.2.so
4016a000-4016e000 rw-p 00131000 08:03 418732 /lib/tls/libc-2.3.2.so
40171000-4056b000 r-xp 00000000 08:05 327572 /usr/java/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so
4056b000-40587000 rw-p 003f9000 08:05 327572 /usr/java/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so
40599000-405ab000 r-xp 00000000 08:03 354132 /lib/libnsl-2.3.2.so
405ab000-405ac000 rw-p 00011000 08:03 354132 /lib/libnsl-2.3.2.so
405ae000-405cf000 r-xp 00000000 08:03 418500 /lib/tls/libm-2.3.2.so
405cf000-405d0000 rw-p 00020000 08:03 418500 /lib/tls/libm-2.3.2.so
405de000-405e9000 r-xp 00000000 08:03 354148 /lib/libnss_files-2.3.2.so
405e9000-405ea000 rw-p 0000a000 08:03 354148 /lib/libnss_files-2.3.2.so
405ea000-405fa000 r-xp 00000000 08:05 327597 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libverify.so
405fa000-405fc000 rw-p 0000f000 08:05 327597 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libverify.so
405fc000-4061c000 r-xp 00000000 08:05 327583 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libjava.so
4061c000-4061e000 rw-p 0001f000 08:05 327583 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libjava.so
4061e000-40632000 r-xp 00000000 08:05 327598 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libzip.so
40632000-40635000 rw-p 00013000 08:05 327598 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libzip.so
40635000-41fcd000 r--s 00000000 08:05 1666003 /usr/java/j2sdk1.4.2_01/jre/lib/rt.jar
42017000-4202d000 r--s 00000000 08:05 1666002 /usr/java/j2sdk1.4.2_01/jre/lib/sunrsasign.jar
4202d000-42108000 r--s 00000000 08:05 1666001 /usr/java/j2sdk1.4.2_01/jre/lib/jsse.jar
42108000-42119000 r--s 00000000 08:05 1665993 /usr/java/j2sdk1.4.2_01/jre/lib/jce.jar
42119000-42672000 r--s 00000000 08:05 1665994 /usr/java/j2sdk1.4.2_01/jre/lib/charsets.jar
Heap at VM Abort:
Heap
def new generation total 576K, used 0K [0x44720000, 0x447c0000, 0x44c00000)
eden space 512K, 0% used [0x44720000, 0x44720048, 0x447a0000)
from space 64K, 0% used [0x447a0000, 0x447a0000, 0x447b0000)
to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000)
tenured generation total 1408K, used 0K [0x44c00000, 0x44d60000, 0x48720000)
the space 1408K, 0% used [0x44c00000, 0x44c00000, 0x44c00200, 0x44d60000)
compacting perm gen total 4096K, used 276K [0x48720000, 0x48b20000, 0x4c720000)
the space 4096K, 6% used [0x48720000, 0x48765070, 0x48765200, 0x48b20000)
Local Time = Sun Dec 21 13:17:08 2003
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid968.log.
# Please refer to the file for further information.
#
****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = hs_err_pid968.log
PC = 0x00000000
SIGNAL = 11
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
--- END JAVA UGLINESS ---
Thanks for any help!
--- BEGIN KERNEL CONF ---
#
# Grsecurity
#
CONFIG_GRKERNSEC=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_SHA256=y
# CONFIG_GRKERNSEC_LOW is not set
# CONFIG_GRKERNSEC_MID is not set
# CONFIG_GRKERNSEC_HI is not set
CONFIG_GRKERNSEC_CUSTOM=y
#
# Address Space Protection
#
# CONFIG_GRKERNSEC_PAX_NOEXEC is not set
CONFIG_GRKERNSEC_PAX_ASLR=y
#CONFIG_GRKERNSEC_PAX_RANDUSTACK is not set
CONFIG_GRKERNSEC_PAX_RANDMMAP=y
CONFIG_GRKERNSEC_KMEM=y
# CONFIG_GRKERNSEC_IO is not set
CONFIG_GRKERNSEC_PROC_MEMMAP=y
CONFIG_GRKERNSEC_HIDESYM=y
#
# ACL options
#
# CONFIG_GRKERNSEC_ACL_HIDEKERN is not set
CONFIG_GRKERNSEC_ACL_MAXTRIES=3
CONFIG_GRKERNSEC_ACL_TIMEOUT=30
#
# Filesystem Protections
#
CONFIG_GRKERNSEC_PROC=y
# CONFIG_GRKERNSEC_PROC_USER is not set
CONFIG_GRKERNSEC_PROC_USERGROUP=y
CONFIG_GRKERNSEC_PROC_GID=10
# CONFIG_GRKERNSEC_PROC_ADD is not set
# CONFIG_GRKERNSEC_LINK is not set
CONFIG_GRKERNSEC_FIFO=y
CONFIG_GRKERNSEC_CHROOT=y
CONFIG_GRKERNSEC_CHROOT_MOUNT=y
CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
CONFIG_GRKERNSEC_CHROOT_PIVOT=y
CONFIG_GRKERNSEC_CHROOT_CHDIR=y
# CONFIG_GRKERNSEC_CHROOT_CHMOD is not set
# CONFIG_GRKERNSEC_CHROOT_FCHDIR is not set
CONFIG_GRKERNSEC_CHROOT_MKNOD=y
# CONFIG_GRKERNSEC_CHROOT_SHMAT is not set
CONFIG_GRKERNSEC_CHROOT_UNIX=y
# CONFIG_GRKERNSEC_CHROOT_FINDTASK is not set
# CONFIG_GRKERNSEC_CHROOT_NICE is not set
CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
# CONFIG_GRKERNSEC_CHROOT_CAPS is not set
#
# Kernel Auditing
#
CONFIG_GRKERNSEC_AUDIT_GROUP=y
CONFIG_GRKERNSEC_AUDIT_GID=1007
# CONFIG_GRKERNSEC_EXECLOG is not set
CONFIG_GRKERNSEC_RESLOG=y
CONFIG_GRKERNSEC_CHROOT_EXECLOG=y
# CONFIG_GRKERNSEC_AUDIT_CHDIR is not set
# CONFIG_GRKERNSEC_AUDIT_MOUNT is not set
# CONFIG_GRKERNSEC_AUDIT_IPC is not set
CONFIG_GRKERNSEC_SIGNAL=y
CONFIG_GRKERNSEC_FORKFAIL=y
CONFIG_GRKERNSEC_TIME=y
#
# Executable Protections
#
CONFIG_GRKERNSEC_EXECVE=y
CONFIG_GRKERNSEC_DMESG=y
CONFIG_GRKERNSEC_RANDPID=y
CONFIG_GRKERNSEC_TPE=y
CONFIG_GRKERNSEC_TPE_ALL=y
CONFIG_GRKERNSEC_TPE_GID=1005
#
# Network Protections
#
CONFIG_GRKERNSEC_RANDNET=y
CONFIG_GRKERNSEC_RANDISN=y
CONFIG_GRKERNSEC_RANDID=y
CONFIG_GRKERNSEC_RANDSRC=y
CONFIG_GRKERNSEC_RANDRPC=y
CONFIG_GRKERNSEC_SOCKET=y
CONFIG_GRKERNSEC_SOCKET_ALL=y
CONFIG_GRKERNSEC_SOCKET_ALL_GID=1004
CONFIG_GRKERNSEC_SOCKET_CLIENT=y
CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=1003
CONFIG_GRKERNSEC_SOCKET_SERVER=y
CONFIG_GRKERNSEC_SOCKET_SERVER_GID=1002
#
# Sysctl support
#
CONFIG_GRKERNSEC_SYSCTL=y
#
# Logging options
#
CONFIG_GRKERNSEC_FLOODTIME=10
CONFIG_GRKERNSEC_FLOODBURST=4
--- END KERNEL CONF ---
And I've tried all the chpax options on /usr/java/j2sdk1.4.2_01/bin/java, but I just get this:
--- BEGIN JAVA UGLINESS ---
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
08048000-0804e000 r-xp 00000000 08:05 702664 /usr/java/j2sdk1.4.2_01/bin/java
0804e000-0804f000 rw-p 00005000 08:05 702664 /usr/java/j2sdk1.4.2_01/bin/java
40000000-40015000 r-xp 00000000 08:03 354219 /lib/ld-2.3.2.so
40015000-40016000 rw-p 00015000 08:03 354219 /lib/ld-2.3.2.so
40016000-4001e000 r-xp 00000000 08:05 1257969 /usr/java/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so
4001e000-4001f000 rw-p 00007000 08:05 1257969 /usr/java/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so
4001f000-40023000 rw-s 00000000 08:03 129080 /tmp/hsperfdata_root/968
40024000-40031000 r-xp 00000000 08:03 418502 /lib/tls/libpthread-0.60.so
40031000-40032000 rw-p 0000c000 08:03 418502 /lib/tls/libpthread-0.60.so
40035000-40037000 r-xp 00000000 08:03 354128 /lib/libdl-2.3.2.so
40037000-40038000 rw-p 00001000 08:03 354128 /lib/libdl-2.3.2.so
40038000-4016a000 r-xp 00000000 08:03 418732 /lib/tls/libc-2.3.2.so
4016a000-4016e000 rw-p 00131000 08:03 418732 /lib/tls/libc-2.3.2.so
40171000-4056b000 r-xp 00000000 08:05 327572 /usr/java/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so
4056b000-40587000 rw-p 003f9000 08:05 327572 /usr/java/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so
40599000-405ab000 r-xp 00000000 08:03 354132 /lib/libnsl-2.3.2.so
405ab000-405ac000 rw-p 00011000 08:03 354132 /lib/libnsl-2.3.2.so
405ae000-405cf000 r-xp 00000000 08:03 418500 /lib/tls/libm-2.3.2.so
405cf000-405d0000 rw-p 00020000 08:03 418500 /lib/tls/libm-2.3.2.so
405de000-405e9000 r-xp 00000000 08:03 354148 /lib/libnss_files-2.3.2.so
405e9000-405ea000 rw-p 0000a000 08:03 354148 /lib/libnss_files-2.3.2.so
405ea000-405fa000 r-xp 00000000 08:05 327597 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libverify.so
405fa000-405fc000 rw-p 0000f000 08:05 327597 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libverify.so
405fc000-4061c000 r-xp 00000000 08:05 327583 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libjava.so
4061c000-4061e000 rw-p 0001f000 08:05 327583 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libjava.so
4061e000-40632000 r-xp 00000000 08:05 327598 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libzip.so
40632000-40635000 rw-p 00013000 08:05 327598 /usr/java/j2sdk1.4.2_01/jre/lib/i386/libzip.so
40635000-41fcd000 r--s 00000000 08:05 1666003 /usr/java/j2sdk1.4.2_01/jre/lib/rt.jar
42017000-4202d000 r--s 00000000 08:05 1666002 /usr/java/j2sdk1.4.2_01/jre/lib/sunrsasign.jar
4202d000-42108000 r--s 00000000 08:05 1666001 /usr/java/j2sdk1.4.2_01/jre/lib/jsse.jar
42108000-42119000 r--s 00000000 08:05 1665993 /usr/java/j2sdk1.4.2_01/jre/lib/jce.jar
42119000-42672000 r--s 00000000 08:05 1665994 /usr/java/j2sdk1.4.2_01/jre/lib/charsets.jar
Heap at VM Abort:
Heap
def new generation total 576K, used 0K [0x44720000, 0x447c0000, 0x44c00000)
eden space 512K, 0% used [0x44720000, 0x44720048, 0x447a0000)
from space 64K, 0% used [0x447a0000, 0x447a0000, 0x447b0000)
to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000)
tenured generation total 1408K, used 0K [0x44c00000, 0x44d60000, 0x48720000)
the space 1408K, 0% used [0x44c00000, 0x44c00000, 0x44c00200, 0x44d60000)
compacting perm gen total 4096K, used 276K [0x48720000, 0x48b20000, 0x4c720000)
the space 4096K, 6% used [0x48720000, 0x48765070, 0x48765200, 0x48b20000)
Local Time = Sun Dec 21 13:17:08 2003
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid968.log.
# Please refer to the file for further information.
#
****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = hs_err_pid968.log
PC = 0x00000000
SIGNAL = 11
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
--- END JAVA UGLINESS ---
Thanks for any help!