Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457618 - Mount of cgroup filesystems fails when booting in SELinux enforcing mode
Summary: Mount of cgroup filesystems fails when booting in SELinux enforcing mode
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard: sec-policy r12
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 20:27 UTC by Mira Ressel
Modified: 2013-03-29 10:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
part of kern.log (kern.log,8.60 KB, text/plain)
2013-02-14 20:27 UTC, Mira Ressel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mira Ressel 2013-02-14 20:27:24 UTC
Created attachment 338898 [details]
part of kern.log

SELinux somehow comes into the way of mounting the cgroup filesystems (done in /etc/init.d/sysfs), leading to the attached error messages in the syslog. There are no avc denials logged, even if dontaudit rules are disabled. I did verify that the avc logging theoretically works at that time.

The problem appears at least with hardened-source-3.7.0 and 3.7.5, using the SELinux base policy r9 and selinux-openrc (revs r9 or r11).

I have successfully reproduced the issue in an VM driven by qemu-kvm and built upon stage3-amd64-hardened+nomultilib-20130130.
Comment 1 Mira Ressel 2013-02-14 21:01:25 UTC
The same problem also occurs with the hardened-sources kernel versions 3.5.4-r1 and 3.2.35.
Comment 2 Mira Ressel 2013-02-15 21:10:27 UTC
"allow kernel_t unlabeled_t:dir search_dir_perms" solves the problem. There are no denials logged due to a ratelimit. 

A big thanks goes to Stephen Smalley, who provided me with invaluable help on the selinux mailing list.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2013-02-18 18:11:26 UTC
Committed to repository, will be in rev12
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2013-03-09 12:40:30 UTC
rev 12 in main tree, ~arch'ed
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2013-03-29 10:55:01 UTC
stabilized