by Stephane » Mon Aug 25, 2014 9:44 am
Ok, so I started my Full learning after all my init.d scripts have run. No problem except that CAP_SETUID.
My VM (ubuntu 14.04) is running a mysql server, but no role/subject created in the resuting policy (it was running during the learning process)
I'd like my RBAC to be active by default on boot so :
I've figured out I cannot use upstart to order my init scripts (bug with .legacy-bootordering) so I've just put a gradm -E in rc.local which is supposed to start on the latest position, but my mysql-server does not start (no logs about it in dmesg), I just have these logs :
[ 3.897378] grsec: (root:U:/sbin/gradm) grsecurity 3.0 RBAC system loaded by /sbin/gradm[gradm:1070] uid/euid:0/0 gid/egid:0/0, parent /etc/rc.local[rc.local:1068] uid/euid:0/0 gid/egid:0/0
[ 3.899890] grsec: (root:U:/) denied create of /tmp/end for writing by /bin/touch[touch:1071] uid/euid:0/0 gid/egid:0/0, parent /etc/rc.local[rc.local:1068] uid/euid:0/0 gid/egid:0/0
[ 3.902251] grsec: (root:U:/) denied open of /run/utmp for reading by /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
[ 3.903359] grsec: (root:U:/) denied open of /run/utmp for reading by /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
[ 3.910420] grsec: (root:U:/) denied open of /dev/ptmx for reading writing by /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
[ 3.911751] grsec: (root:U:/) denied open of /dev/kmsg for writing by /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0
[ 3.913322] grsec: more alerts, logging disabled for 10 seconds
[ 18.193438] grsec: (root:U:/) denied open of /run/lock/ntpdate-ifup.lock for reading by /usr/bin/lockfile-create[lockfile-create:862] uid/euid:0/0 gid/egid:0/0, parent /etc/network/if-up.d/ntpdate[ntpdate:861] uid/euid:0/0 gid/egid:0/0
[ 20.840507] grsec: (root:U:/) use of CAP_SYS_TTY_CONFIG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.853523] grsec: (root:U:/) use of CAP_SYS_TTY_CONFIG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.855600] grsec: (root:U:/) use of CAP_SYSLOG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.857425] grsec: (root:U:/) use of CAP_SYS_TTY_CONFIG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.859144] grsec: (root:U:/) use of CAP_SYS_TTY_CONFIG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.860909] grsec: (root:U:/) use of CAP_SYS_TTY_CONFIG denied for /sbin/plymouthd[plymouthd:210] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 20.862676] grsec: more alerts, logging disabled for 10 seconds
[ 21.960013] random: nonblocking pool is initialized
[ 32.632634] grsec: From 192.23.4.40: (user1:U:/usr/bin/sudo) denied create of /var/lib/sudo/user1/3 for writing by /usr/bin/sudo[sudo:1134] uid/euid:1000/0 gid/egid:1000/1000, parent /bin/bash[bash:1120] uid/euid:1000/1000 gid/egid:1000/1000
[ 33.195508] grsec: (root:U:/) denied open of /run/lock/ntpdate-ifup.lock for reading by /usr/bin/lockfile-create[lockfile-create:862] uid/euid:0/0 gid/egid:0/0, parent /etc/network/if-up.d/ntpdate[ntpdate:861] uid/euid:0/0 gid/egid:0/0
[ 40.448089] grsec: From 192.23.4.40: (root:U:/sbin/gradm) successful change to special role admin (id 1) by /sbin/gradm[gradm:1146] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:1136] uid/euid:0/0 gid/egid:0/0
[ 43.033974] grsec: (root:U:/) denied access to hidden file /sys/devices/system/node by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 43.035552] grsec: (root:U:/) denied access to hidden file /sys/devices/system/cpu by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 43.037067] grsec: (root:U:/) denied access to hidden file /sys/bus/pci/devices by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 53.197235] grsec: (root:U:/) denied open of /run/lock/ntpdate-ifup.lock for reading by /usr/bin/lockfile-create[lockfile-create:862] uid/euid:0/0 gid/egid:0/0, parent /etc/network/if-up.d/ntpdate[ntpdate:861] uid/euid:0/0 gid/egid:0/0
[ 63.034005] grsec: (root:U:/) denied access to hidden file /sys/devices/system/node by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 63.035944] grsec: (root:U:/) denied access to hidden file /sys/devices/system/cpu by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
[ 63.038536] grsec: (root:U:/) denied access to hidden file /sys/bus/pci/devices by /usr/sbin/irqbalance[irqbalance:958] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
Did I missed something ? Do I need to wait more before starting rbac ?
Thx