RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1715134 - sbd is unable to set rt-priority if CPUAccounting is enabled
Summary: sbd is unable to set rt-priority if CPUAccounting is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 1713021
Blocks: 1713023 1715136
TreeView+ depends on / blocked
 
Reported: 2019-05-29 16:54 UTC by Klaus Wenninger
Modified: 2020-09-21 08:27 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-3.14.3-12.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1713021
Environment:
Last Closed: 2019-11-05 22:11:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3770681 0 None None None 2020-08-12 13:29:47 UTC
Red Hat Product Errata RHBA-2019:3547 0 None None None 2019-11-05 22:12:01 UTC

Comment 3 Klaus Wenninger 2019-05-31 14:45:40 UTC
I've done some logging in permissive-mode (enforcing would bail out after the first attempt and omit the rest).
But I'm not sure if I really see the traces of all the actions that I had expected to trigger.
Whenever it is 'system.slice' this can of course be any slice that was configured in the unit-file. 

time->Fri May 31 16:35:46 2019
type=USER_AVC msg=audit(1559313346.290:437): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  received setenforce notice (enforcing=0)  exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
----
time->Fri May 31 16:35:46 2019
type=PROCTITLE msg=audit(1559313346.302:438): proctitle=2F7573722F7362696E2F736264002D76002D70002F7661722F72756E2F7362642E706964007761746368
type=SYSCALL msg=audit(1559313346.302:438): arch=c000003e syscall=257 success=yes exit=4 a0=ffffff9c a1=555abc530b20 a2=0 a3=0 items=0 ppid=3571 pid=3573 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sbd" exe="/usr/sbin/sbd" subj=system_u:system_r:sbd_t:s0 key=(null)
type=AVC msg=audit(1559313346.302:438): avc:  denied  { open } for  pid=3573 comm="sbd" path="/sys/fs/cgroup/cpu,cpuacct/cpu.rt_runtime_us" dev="cgroup" ino=12 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559313346.302:438): avc:  denied  { read } for  pid=3573 comm="sbd" name="cpu.rt_runtime_us" dev="cgroup" ino=12 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559313346.302:438): avc:  denied  { read } for  pid=3573 comm="sbd" name="cpu" dev="tmpfs" ino=88 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=lnk_file permissive=1
type=AVC msg=audit(1559313346.302:438): avc:  denied  { search } for  pid=3573 comm="sbd" name="/" dev="tmpfs" ino=59 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=1
----
time->Fri May 31 16:35:46 2019
type=PROCTITLE msg=audit(1559313346.303:439): proctitle=2F7573722F7362696E2F736264002D76002D70002F7661722F72756E2F7362642E706964007761746368
type=SYSCALL msg=audit(1559313346.303:439): arch=c000003e syscall=5 success=yes exit=0 a0=4 a1=7fff73944230 a2=7fff73944230 a3=0 items=0 ppid=3571 pid=3573 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sbd" exe="/usr/sbin/sbd" subj=system_u:system_r:sbd_t:s0 key=(null)
type=AVC msg=audit(1559313346.303:439): avc:  denied  { getattr } for  pid=3573 comm="sbd" path="/sys/fs/cgroup/cpu,cpuacct/system.slice/cpu.rt_runtime_us" dev="cgroup" ino=31 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1
----
time->Fri May 31 16:35:46 2019
type=PROCTITLE msg=audit(1559313346.303:440): proctitle=2F7573722F7362696E2F736264002D76002D70002F7661722F72756E2F7362642E706964007761746368
type=SYSCALL msg=audit(1559313346.303:440): arch=c000003e syscall=257 success=yes exit=4 a0=ffffff9c a1=555abc5310a4 a2=241 a3=1b6 items=0 ppid=3571 pid=3573 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sbd" exe="/usr/sbin/sbd" subj=system_u:system_r:sbd_t:s0 key=(null)
type=AVC msg=audit(1559313346.303:440): avc:  denied  { write } for  pid=3573 comm="sbd" name="tasks" dev="cgroup" ino=5 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1

Comment 16 Zdenek Pytela 2019-06-26 08:25:28 UTC
Klaus,

based on https://bugzilla.redhat.com/show_bug.cgi?id=1713021#c3

it seems this permission is required as well - is it correct?

allow sbd_t cgroup_t:dir write;

Comment 17 Klaus Wenninger 2019-06-26 08:47:22 UTC
Zdenek,

Good question! Iirc I've quite intensively tested selinux-policy-3.14.3-8.el8 on
my rhel-8.0.0-setup and didn't find any issues (everything working well and
no denials logged).
Would writing to existent files require that property?

Klaus

Comment 18 Zdenek Pytela 2019-06-26 09:16:02 UTC
Klaus,

The permission reported in Milos's AVC was "writing to a directory", i. e. creating a new file. Maybe reboot is required to test the scenario completely?

Comment 19 Klaus Wenninger 2019-06-26 09:38:42 UTC
(In reply to Zdenek Pytela from comment #18)
> Klaus,
> 
> The permission reported in Milos's AVC was "writing to a directory", i. e.
> creating a new file. Maybe reboot is required to test the scenario
> completely?

Hmm .. mystery only writing line is

f = fopen("/sys/fs/cgroup/cpu/tasks", "w");

and that one is present regardless of if cpu-accounting is on or off.

All others are mode = "rt".

Comment 20 Lukas Vrabec 2019-07-02 16:27:14 UTC
Klaus, 

So is the latest AVC required to make sbd work smoothly on RHEL8? 

Thanks,
Lukas.

Comment 63 errata-xmlrpc 2019-11-05 22:11:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3547


Note You need to log in before you can comment on or make changes to this bug.