gradm -R, gramd -u, gradm ld.so [SOLVED]

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

gradm -R, gramd -u, gradm ld.so [SOLVED]

Postby Dwokfur » Mon Nov 21, 2005 8:44 am

First of all: thanks for grsec & pax staff for giving the opportunity to secure my box.

I would address three issues (running Gentoo Base System 1.6.13, Hardened x86 profile, compiled mcpu=i686 -O2, 2.6.14.2-grsec kernel with a few clean netfilter patch-o-matic patches, gradm-2.1.7.200511041858).
The first two issues were also present with 2.6.11.12-grsec + gradm-2.1.6.

1. gradm -u
After succesful authentication to admin role, I do not manage to log out of the special role:
Code: Select all
myhost ~ # gradm -a admin
Password:
myhost ~ # gradm -u
You are not in a special role.
myhost ~ #

The log contains a message about the successful authentication, but no further messages related to the failed operation:
Code: Select all
Nov 21 13:16:09 myhost grsec: (root:U:/sbin/gradm) successful change to special role admin (id 11) by /sbin/gradm[gradm:8721] u
id/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:12859] uid/euid:0/0 gid/egid:0/0


2. gradm -R
I would prefer to reload the policy without ever really stopping the RBAC system. After changing to the special role admin, reloading the policy fails using either the admin's, the root's or the grsec password.
Code: Select all
myhost ~ # gradm -R
Password:
Invalid password.
myhost ~ # gradm -R
Password:
Invalid password.
myhost ~ # gradm -R
Password:
Invalid password.

No log messages show up indicating the failed opreration.

3. gradm tries to access ld.so
Sometimes (but not always) shutting down the RBAC system produces a log entry indicating failed access of ld.so by gradm. I can't reliably reproduce this symptom.

Please confirm my findings, share your thoughts or provide a solution of yours.

Regards,
Dw.
Last edited by Dwokfur on Sun Nov 27, 2005 9:29 am, edited 1 time in total.
Dwokfur
 
Posts: 99
Joined: Tue Jun 08, 2004 10:07 am

Postby spender » Fri Nov 25, 2005 7:59 pm

Can you paste the admin part of your policy? I believe this is a configuration error involving a missing "a" flag that since 2.1.6 is required for subjects that use the /dev/grsec device. Missing this flag would produce the results you are seeing.

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Postby Dwokfur » Sun Nov 27, 2005 9:33 am

spender wrote:Can you paste the admin part of your policy? I believe this is a configuration error involving a missing "a" flag that since 2.1.6 is required for subjects that use the /dev/grsec device. Missing this flag would produce the results you are seeing.

-Brad


Thank you for pointing this out. I use Grsec for ages (1.x), and kept updating the config file for some time now. Completing the admin role's root subject with "a" blew away all symptoms instantly.

Regards,
Dw.
Dwokfur
 
Posts: 99
Joined: Tue Jun 08, 2004 10:07 am

Postby xrath » Tue Dec 20, 2005 8:41 am

Ah I was having that problem too! Nice one :D
xrath
 
Posts: 12
Joined: Sun Nov 16, 2003 12:02 pm


Return to grsecurity support

cron