Actions
Bug #4458
closedAVC denials aboutname="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Installing Foreman nightly from
baseurl=http://yum.theforeman.org/nightly/el6/$basearch
on RHEL 6.5 causes AVC denials to eventually show up in the audit.log:
type=AVC msg=audit(1393403231.005:232): avc: denied { search } for pid=23349 comm="ps" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir type=AVC msg=audit(1393403231.005:232): avc: denied { read } for pid=23349 comm="ps" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file type=AVC msg=audit(1393403231.005:232): avc: denied { open } for pid=23349 comm="ps" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file type=AVC msg=audit(1393403409.342:248): avc: denied { search } for pid=23695 comm="PassengerHelper" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir type=AVC msg=audit(1393403409.342:248): avc: denied { read } for pid=23695 comm="PassengerHelper" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file type=AVC msg=audit(1393403409.342:248): avc: denied { open } for pid=23695 comm="PassengerHelper" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:passenger_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file
The file (path) in question is /sys/devices/system/cpu/online.
Updated by Lukas Zapletal almost 11 years ago
- Category set to 56
Thanks. It looks like we need to open access to sysfs domain, but I can't find WHY it tries to read this file.
It looks like both agent and memory-stats processes are using "ps" tool to get some info about CPU:
https://github.com/phusion/passenger/blob/master/ext/common/Utils/ProcessMetricsCollector.h#L474
But I don't see any leaked descriptors or anything like that (when I run it manually):
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3 read(3, "0-3\n", 8192) = 4 close(3) = 0
Updated by Dominic Cleal almost 11 years ago
- Is duplicate of Bug #3465: AVC denials with Foreman 1.3 on RHEL 6 added
Updated by Dominic Cleal almost 11 years ago
- Project changed from Foreman to SELinux
- Category deleted (
56) - Status changed from New to Duplicate
Looks the same as #3465.
Updated by Lukas Zapletal almost 11 years ago
Ok I guess we need to add the following rules:
allow passenger_t sysfs_t:dir search; allow passenger_t sysfs_t:file { read open };
Actions