[solved] denied executable mmap of / (root dir?)
Posted: Thu Oct 09, 2014 6:42 pm
I have seen other threads such as this one about a similar thing, but in my case it seems not to make sense.
This is while RBAC is enabled:
Why should I need to set a rule for exec on "/"? Wouldn't that not make sense and give x to the whole machine like the following?
And the effect of this problem is quite severe. I ran full learning across 2 days, over probably more than 3 reboots and different people using the machine, but grsec is killing many KDE processes (konsole, klipper, plasma-desktop, etc.) and won't let me log in on text ttys. Killing X with ctrl+alt+backspace meant that X didn't start again. So I had to sysrq+u,s,b to reboot after enabling RBAC when all my consoles died. I thought full learning would have allowed these things to run and start, since I use them many times per day, and I would only have to add more rules for things that didn't run yet (maybe some weekly cronjobs, or system updates when the IPv4 addresses in the policy are stale, etc.). (and then after rebooting, KDE was very broken, and restoring ~/.kde4 from backup solved that...). And the fontconfig problem above should not affect the text TTYs, so something important isn't even being logged. (and I realize grsecurity is probably intended for servers, but if it is going to fail, it should at least log it, and be understood first, before I implement it somewhere important)
So how can I satisfy grsec so it won't kill klipper, plasma-desktop, konsole, etc.?
Do I need to duplicate my settings I already set with paxctl in the policy too?
Do I really need to set "/ x"?
Is there some important logging I am missing and can enable?
Linux peter 3.16.3-grsec-peter-grsec+ #1 SMP PREEMPT Fri Oct 3 12:03:24 CEST 2014 x86_64 x86_64 x86_64 GNU/Linux
gradm-3.0-201408301734.tar.gz
grsecurity-3.0-3.16.3-201409282025.patch (the test version, not stable)
systemd-208-23.3
This is while RBAC is enabled:
- Code: Select all
2014-10-09T23:37:19.200621+02:00 peetaur kernel: [30687.023201] grsec: (peter:U:/usr/bin/kdeinit4) denied executable mmap of / by /usr/bin/kdeinit4[klipper:5283] uid/euid:1000/1000 gid/egid:100/100, parent /usr/lib/systemd/systemd[systemd:1] uid/euid:0/0 gid/egid:0/0
2014-10-09T23:37:19.236634+02:00 peetaur kernel: [30687.059456] grsec: (peter:U:/) denied access to hidden file /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-x86_64.cache-4 by /usr/lib64/kde4/libexec/drkonqi[drkonqi:17044] uid/euid:1000/1000 gid/egid:100/100, parent /usr/bin/kdeinit4[kdeinit4:4779] uid/euid:1000/1000 gid/egid:100/100
Why should I need to set a rule for exec on "/"? Wouldn't that not make sense and give x to the whole machine like the following?
- Code: Select all
role peter u
subject / {
/ x
...
}
And the effect of this problem is quite severe. I ran full learning across 2 days, over probably more than 3 reboots and different people using the machine, but grsec is killing many KDE processes (konsole, klipper, plasma-desktop, etc.) and won't let me log in on text ttys. Killing X with ctrl+alt+backspace meant that X didn't start again. So I had to sysrq+u,s,b to reboot after enabling RBAC when all my consoles died. I thought full learning would have allowed these things to run and start, since I use them many times per day, and I would only have to add more rules for things that didn't run yet (maybe some weekly cronjobs, or system updates when the IPv4 addresses in the policy are stale, etc.). (and then after rebooting, KDE was very broken, and restoring ~/.kde4 from backup solved that...). And the fontconfig problem above should not affect the text TTYs, so something important isn't even being logged. (and I realize grsecurity is probably intended for servers, but if it is going to fail, it should at least log it, and be understood first, before I implement it somewhere important)
So how can I satisfy grsec so it won't kill klipper, plasma-desktop, konsole, etc.?
Do I need to duplicate my settings I already set with paxctl in the policy too?
Do I really need to set "/ x"?
Is there some important logging I am missing and can enable?
Linux peter 3.16.3-grsec-peter-grsec+ #1 SMP PREEMPT Fri Oct 3 12:03:24 CEST 2014 x86_64 x86_64 x86_64 GNU/Linux
gradm-3.0-201408301734.tar.gz
grsecurity-3.0-3.16.3-201409282025.patch (the test version, not stable)
systemd-208-23.3