Description of problem: * the rkt-metadata service starts successfully, but some denials are triggered Version-Release number of selected component (if applicable): rkt-1.30.0-3.20190512git0c87656.fc32.x86_64 selinux-policy-3.14.5-28.fc32.noarch selinux-policy-targeted-3.14.5-28.fc32.noarch How reproducible: * always Steps to Reproduce: 1. get a Fedora 32 (targeted policy is active) 2. start the rkt-metadata service 3. search for SELinux denials Actual results (enforcing mode): ---- type=PROCTITLE msg=audit(03/02/2020 03:43:03.286:417) : proctitle=/usr/bin/rkt metadata-service type=PATH msg=audit(03/02/2020 03:43:03.286:417) : item=0 name=/sys/kernel/mm/transparent_hugepage/hpage_pmd_size inode=2540 dev=00:16 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(03/02/2020 03:43:03.286:417) : cwd=/ type=SYSCALL msg=audit(03/02/2020 03:43:03.286:417) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x16393e0 a2=O_RDONLY a3=0x0 items=1 ppid=1 pid=2218 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rkt exe=/usr/bin/rkt subj=system_u:system_r:rkt_t:s0 key=(null) type=AVC msg=audit(03/02/2020 03:43:03.286:417) : avc: denied { read } for pid=2218 comm=rkt name=hpage_pmd_size dev="sysfs" ino=2540 scontext=system_u:system_r:rkt_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0 ---- Expected results: * no SELinux denials
SELinux denials caught in permissive mode: ---- type=PROCTITLE msg=audit(03/02/2020 07:39:59.753:680) : proctitle=/usr/bin/rkt metadata-service type=PATH msg=audit(03/02/2020 07:39:59.753:680) : item=0 name=/sys/kernel/mm/transparent_hugepage/hpage_pmd_size inode=2540 dev=00:16 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(03/02/2020 07:39:59.753:680) : cwd=/ type=SYSCALL msg=audit(03/02/2020 07:39:59.753:680) : arch=x86_64 syscall=openat success=yes exit=4 a0=0xffffff9c a1=0x16393e0 a2=O_RDONLY a3=0x0 items=1 ppid=1 pid=18112 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=rkt exe=/usr/bin/rkt subj=system_u:system_r:rkt_t:s0 key=(null) type=AVC msg=audit(03/02/2020 07:39:59.753:680) : avc: denied { open } for pid=18112 comm=rkt path=/sys/kernel/mm/transparent_hugepage/hpage_pmd_size dev="sysfs" ino=2540 scontext=system_u:system_r:rkt_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(03/02/2020 07:39:59.753:680) : avc: denied { read } for pid=18112 comm=rkt name=hpage_pmd_size dev="sysfs" ino=2540 scontext=system_u:system_r:rkt_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 ----
PR: https://github.com/fedora-selinux/selinux-policy-contrib/pull/219
Merged and backported to F32. commit cabd292137b71c97348eb499c8089aaf1f41a4a2 (HEAD -> rawhide, upstream/rawhide) Author: Patrik Koncity <pkoncity> Date: Fri Mar 13 15:59:18 2020 +0100 Update rkt policy to allow rkt_t domain to read sysfs filesystem rkt_t domain need to read size of a transparent hugepage which found in hpage_pmd_size to optimize memory allocation for rkt Adding macro dev_read_sysfs(rkt_t) which allow to read files in sysfs_t domain Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1809000
FEDORA-2020-9896f80cf0 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9896f80cf0
FEDORA-2020-9896f80cf0 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9896f80cf0` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9896f80cf0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-9896f80cf0 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.