I recently installed the latest grsec patch 2.9.1 and linux kernel 3.2.51.
I'm running into a strange issue where the dbus-daemon is running into the max open files limit when grsec is enabled. Here's what I'm seeing:
The dbus subject produced from learning mode:
subject /bin/dbus-daemon o {
/
/bin h
/bin/dbus-daemon rx
/boot h
/dev h
/dev/null rw
/dev/urandom rxw
/etc rx
/etc/dbus-1 h
/etc/dbus-1/session.conf r
/etc/dbus-1/session.d
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/ppp h
/etc/samba/smbpasswd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib
/lib/modules h
/lib/x86_64-linux-gnu rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/dbus/pid rwcdlL
/run/console/root rx
/run/dbus/system_bus_socket rxwcdlL
/selinux r
/sys h
/usr h
/usr/lib
/usr/share/dbus-1/services r
/usr/share/dbus-1/system-services rx
/var/backups h
/var/log h
+CAP_ALL
bind disabled
connect disabled
sock_allow_family all
}
root@server:/proc/12179# ls -l fd |wc -l
259
This count keeps increasing whenever a user ssh'es to the box and never decreases until dbus spins on a loop trying to get another FD
lsof shows a growing list of processes that no longer exist under /proc or in process table but have an open file
dbus-daem 12179 messagebus 102r REG 0,3 0 2651303205 /proc/24412/cmdline
dbus-daem 12179 messagebus 103r REG 0,3 0 2651303221 /proc/24437/cmdline
dbus-daem 12179 messagebus 104r REG 0,3 0 2651303237 /proc/24462/cmdline
dbus-daem 12179 messagebus 105r REG 0,3 0 2651303253 /proc/24487/cmdline
dbus-daem 12179 messagebus 106r REG 0,3 0 2651303269 /proc/24512/cmdline
dbus-daem 12179 messagebus 107r REG 0,3 0 2651303285 /proc/24537/cmdline
dbus-daem 12179 messagebus 108r REG 0,3 0 2651303301 /proc/24562/cmdline
dbus-daem 12179 messagebus 109r REG 0,3 0 2651303317 /proc/24587/cmdline
dbus-daem 12179 messagebus 110r REG 0,3 0 2651303333 /proc/24612/cmdline
Any ideas as to why this is happening?
Thanks,
Les