lots of execmem failures with 2.6.10
When trying to boot a 2.6.10 kernel, with the SELinux patch from the NSA website applied, I'm getting a LOT of denial messages such as the ones shown below. This hoses the boot process to the point where the box is essentially unusable (no networking, impossible to logon at the console, etc.). Under 2.6.9, the same policy works just fine.
audit(1105293465.527:0): avc: denied { execmem } for pid=237 comm=uname scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process
audit(1105293465.663:0): avc: denied { execmem } for pid=240 comm=touch scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process
audit(1105293466.661:0): avc: denied { execmem } for pid=259 comm=sync scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process
audit(1105293466.716:0): avc: denied { execmem } for pid=262 comm=uname scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=processI haven't seen any mention of this on the list... any idea what's going on? My policy source files are from cvs, as of three weeks or so ago. I don't mind updating to current cvs if necessary, but don't see any obvious updates relating to execmem. The server is an old Pentium II box (nothing at all unusual about it), running Debian sid.
I can update my policy to allow the execmem easily enough, but would expect to find it already in cvs if this was an expected issue. Any thoughts?
Quoted 17 lines · Greg Norris
When trying to boot a 2.6.10 kernel, with the SELinux patch from the NSA website applied, I'm getting a LOT of denial messages such as the ones shown below. This hoses the boot process to the point where the box is essentially unusable (no networking, impossible to logon at the console, etc.). Under 2.6.9, the same policy works just fine.
audit(1105293465.527:0): avc: denied { execmem } for pid=237 comm=uname scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process audit(1105293465.663:0): avc: denied { execmem } for pid=240 comm=touch scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process audit(1105293466.661:0): avc: denied { execmem } for pid=259 comm=sync scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=process audit(1105293466.716:0): avc: denied { execmem } for pid=262 comm=uname scontext=system_u:system_r:initrc_t tcontext=system_u:system_r:initrc_t tclass=processI haven't seen any mention of this on the list... any idea what's going on? My policy source files are from cvs, as of three weeks or so ago. I don't mind updating to current cvs if necessary, but don't see any obvious updates relating to execmem. The server is an old Pentium II box (nothing at all unusual about it), running Debian sid.
Quoted 3 lines
I can update my policy to allow the execmem easily enough, but would expect to find it already in cvs if this was an expected issue. Any thoughts?
The thread that discussed the new controls over executable mappings starts at http://marc.theaimsgroup.com/?l=selinux&m=110003195017130&w=2
and the final submitted version was
http://marc.theaimsgroup.com/?l=linux-kernel&m=110200324503263&w=2.
The question is why is your userland attempting to create executable anonymous mappings or executable writable private file mappings. May be related to the legacy binary issue that came up earlier, where the mainline kernel enables read-implies-exec behavior if the binary is a "legacy" binary, i.e. lacks PT_GNU_STACK. What does execstack -q which uname report?
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · Stephen Smalley
The question is why is your userland attempting to create executable anonymous mappings or executable writable private file mappings. May be related to the legacy binary issue that came up earlier, where the mainline kernel enables read-implies-exec behavior if the binary is a "legacy" binary, i.e. lacks
PT_GNU_STACK. What does execstack -qwhich unamereport?
I think you've pointed me in the right direction. On my SELinux box it yields the following:
adric@sasami:~$ execstack -q `which uname` ? /bin/uname
On my non-SELinux box (also Debian sid), however, it looks like this:
adric@yggdrasil[~]$ execstack -q `which uname` - /bin/uname
The difference is caused by the former box getting the "coreutils" package (and a handful of others) from Russell's SELinux archive, which I guess has gotten somewhat out of date. I'll try rebuilding the relevant packages over the next few days, and see if that resolves my problem... if so, I'll post the updated packages under "http://people.debian.org/~adric/".
Thanx for your assistance!
Quoted 6 lines · Greg Norris
The difference is caused by the former box getting the "coreutils" package (and a handful of others) from Russell's SELinux archive, which I guess has gotten somewhat out of date. I'll try rebuilding the relevant packages over the next few days, and see if that resolves my problem... if so, I'll post the updated packages under "http://people.debian.org/~adric/".
I've built a SELinux-enabled coreutils 5.2.1 package for Debian, and I'm happy to report that it does indeed resolve my issue. I want to do a bit more testing before making the package generally available (I just rebooted to 2.6.10 about 15 minutes ago), but I'll upload it either tomorrow or Monday if no show-stoppers turn up.
Thanx again for your help!
Quoted 5 lines · Greg Norris
I've built a SELinux-enabled coreutils 5.2.1 package for Debian, and I'm happy to report that it does indeed resolve my issue. I want to do a bit more testing before making the package generally available (I just rebooted to 2.6.10 about 15 minutes ago), but I'll upload it either tomorrow or Monday if no show-stoppers turn up.
No problems so far, so I've posted the i386 binary package and source components at "http://people.debian.org/~adric/selinux/coreutils/". I'll look into making it apt-get'able tomorrow.
Quoted 5 lines · Greg Norris
I've built a SELinux-enabled coreutils 5.2.1 package for Debian, and I'm happy to report that it does indeed resolve my issue. I want to do a bit more testing before making the package generally available (I just rebooted to 2.6.10 about 15 minutes ago), but I'll upload it either tomorrow or Monday if no show-stoppers turn up.
Good, glad to hear it. BTW, when/if people get around to submitting SELinux userland patches for inclusion in Debian (or upstream, for packages that have upstream maintainers), please recheck against the latest SELinux patches in the public Fedora CVS tree to see whether anything has changed there. See http://cvs.fedora.redhat.com/core.shtml
for information about the public Fedora CVS tree. Note also that not all SELinux-related changes are patches in that tree, as some SELinux functionality has been folded into the base packages, e.g. libuser, logrotate, passwd, prelink, glibc, rpm, initscripts, ...
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.