Page 1 of 1

gradm problem

PostPosted: Sun Feb 26, 2012 5:56 am
by lego_12239
Hi, all.

I have debian 6.0 with 2.6.32.57 and 3.2.7 vanilla kernels patched with grsecurity patch. I got gradm 2.9 source from grsecurity.net. When I tried to do gradm -F -L /etc/grsec/learning.logs, i got next message on a console:

Code: Select all
You are using incompatible versions of gradm and grsecurity.
Please update both versions to the ones available on the website.
Make sure your gradm has been compiled for the kernel you are currently running.


and in dmesg:

Code: Select all
grsec: From 192.168.1.1: /dev/grsec: 12 bytes sent 16 required, being fed garbaged by /sbin/gradm[gradm:1161] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:1157] uid/euid:0/0 gid/egid:0/0
grsec: From 192.168.1.1: /dev/grsec: 12 bytes sent 16 required, being fed garbaged by /sbin/gradm[gradm:1161] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:1157] uid/euid:0/0 gid/egid:0/0


This messages are the same on both kernels. What do i make wrong?

I have 64 bit kernels and 32 bit userland, so i made next changes in Makefile of gradm:
Code: Select all
-LIBS := $(shell if [ "`uname -m`" != "sparc64" -a "`uname -m`" != "x86_64" ]; then echo "-lfl"
; else echo "" ; fi)
-OPT_FLAGS := $(shell if [ "`uname -m`" != "sparc64" ] && [ "`uname -m`" != "x86_64" ]; then echo "-O2" ; else echo "-O2 -m64" ; fi)
+#LIBS := $(shell if [ "`uname -m`" != "sparc64" -a "`uname -m`" != "x86_64" ]; then echo "-lfl" ; else echo "" ; fi)
+LIBS := -lfl
+#OPT_FLAGS := $(shell if [ "`uname -m`" != "sparc64" ] && [ "`uname -m`" != "x86_64" ]; then echo "-O2" ; else echo "-O2 -m64" ; fi)
+OPT_FLAGS := -O2

Re: gradm problem

PostPosted: Sun Feb 26, 2012 6:13 pm
by spender
Did that change fix your problem?

-Brad

Re: gradm problem

PostPosted: Mon Feb 27, 2012 2:08 am
by lego_12239
No. This was a step to simply make gradm in my 32 bit userland. Without it gradm refused to compile at all.

But, I forgot to say that grlearn run after this command regardless of this error message.

Re: gradm problem

PostPosted: Mon Feb 27, 2012 8:27 am
by spender
Can you show me the output of: 'file /sbin/gradm'?

-Brad

Re: gradm problem

PostPosted: Mon Feb 27, 2012 4:01 pm
by lego_12239
Code: Select all
/sbin/gradm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

Re: gradm problem

PostPosted: Mon Feb 27, 2012 4:17 pm
by spender
You need to be able to build a 64bit version of gradm, which is what the Makefile was designed to do. gradm currently requires itself to be 64bit when run on a 64bit kernel.

-Brad

Re: gradm problem

PostPosted: Tue Feb 28, 2012 3:23 pm
by lego_12239
In 64 bit Debian it work. gradm -S show me:

Code: Select all
The RBAC system is currently enabled


But grlearn is not running. Is it ok?

Re: gradm problem

PostPosted: Tue Feb 28, 2012 8:31 pm
by spender
You won't be able to see grlearn except in the admin role.

-Brad