Bug 2028637
Summary: | httpd fails to start with opencryptoki SW token | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Stanislav Zidek <szidek> |
Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.6 | CC: | bnater, ksrot, lvrabec, mmalik |
Target Milestone: | rc | Keywords: | Regression, Triaged |
Target Release: | 8.8 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.14.3-117.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-05-16 09:03:44 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Comment 1
Milos Malik
2021-12-02 20:48:40 UTC
Following SELinux denials appeared in permissive mode: ---- type=PROCTITLE msg=audit(12/02/2021 15:49:36.552:674) : proctitle=/usr/sbin/httpd -DFOREGROUND type=PATH msg=audit(12/02/2021 15:49:36.552:674) : item=0 name=/dev/shm/var.lib.opencryptoki.swtok inode=64710 dev=00:16 mode=file,660 ouid=apache ogid=pkcs11 rdev=00:00 obj=unconfined_u:object_r:pkcs_slotd_tmpfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(12/02/2021 15:49:36.552:674) : cwd=/ type=SYSCALL msg=audit(12/02/2021 15:49:36.552:674) : arch=x86_64 syscall=openat success=yes exit=19 a0=0xffffff9c a1=0x7ffeb38e2e60 a2=O_RDWR|O_NOFOLLOW|O_CLOEXEC a3=0x0 items=1 ppid=1 pid=21325 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(12/02/2021 15:49:36.552:674) : avc: denied { open } for pid=21325 comm=httpd path=/dev/shm/var.lib.opencryptoki.swtok dev="tmpfs" ino=64710 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:pkcs_slotd_tmpfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(12/02/2021 15:49:36.552:674) : avc: denied { read write } for pid=21325 comm=httpd name=var.lib.opencryptoki.swtok dev="tmpfs" ino=64710 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:pkcs_slotd_tmpfs_t:s0 tclass=file permissive=1 ---- type=PROCTITLE msg=audit(12/02/2021 15:49:36.553:675) : proctitle=/usr/sbin/httpd -DFOREGROUND type=SYSCALL msg=audit(12/02/2021 15:49:36.553:675) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x13 a1=0x7ffeb38e2f10 a2=0x7ffeb38e2f10 a3=0x0 items=0 ppid=1 pid=21325 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(12/02/2021 15:49:36.553:675) : avc: denied { getattr } for pid=21325 comm=httpd path=/dev/shm/var.lib.opencryptoki.swtok dev="tmpfs" ino=64710 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:pkcs_slotd_tmpfs_t:s0 tclass=file permissive=1 ---- type=PROCTITLE msg=audit(12/02/2021 15:49:36.553:676) : proctitle=/usr/sbin/httpd -DFOREGROUND type=MMAP msg=audit(12/02/2021 15:49:36.553:676) : fd=19 flags=MAP_SHARED type=SYSCALL msg=audit(12/02/2021 15:49:36.553:676) : arch=x86_64 syscall=mmap success=yes exit=140231208845312 a0=0x0 a1=0x14368 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED items=0 ppid=1 pid=21325 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(12/02/2021 15:49:36.553:676) : avc: denied { map } for pid=21325 comm=httpd path=/dev/shm/var.lib.opencryptoki.swtok dev="tmpfs" ino=64710 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:pkcs_slotd_tmpfs_t:s0 tclass=file permissive=1 ---- I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy/pull/966 Note the permissions will be added when httpd_use_opencryptoki boolean is on. It is off by default. 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 (selinux-policy bug fix and enhancement update), 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-2023:2965 |