Bug 1980241
Summary: | systemd-run --shell denied by selinux | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Roshan Shariff <roshan.shariff> |
Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 36 | CC: | dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, vmojzis, zpytela |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-36.9-1.fc36 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-28 01:14:46 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: |
Description
Roshan Shariff
2021-07-08 07:50:33 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Following SELinux denial appears in enforcing mode: ---- type=PROCTITLE msg=audit(05/13/2022 10:57:19.765:435) : proctitle=(bash) type=PATH msg=audit(05/13/2022 10:57:19.765:435) : item=0 name=/dev/pts/1 inode=4 dev=00:19 mode=character,620 ouid=root ogid=tty rdev=88:01 obj=unconfined_u:object_r:user_devpts_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(05/13/2022 10:57:19.765:435) : cwd=/ type=SYSCALL msg=audit(05/13/2022 10:57:19.765:435) : arch=x86_64 syscall=inotify_add_watch success=no exit=EACCES(Permission denied) a0=0x3 a1=0x55e39a4fe560 a2=0x18 a3=0x0 items=1 ppid=1 pid=1109 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(bash) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null) type=AVC msg=audit(05/13/2022 10:57:19.765:435) : avc: denied { watch watch_reads } for pid=1109 comm=(bash) path=/dev/pts/1 dev="devpts" ino=4 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_devpts_t:s0 tclass=chr_file permissive=0 ---- # rpm -qa selinux\* systemd\* | sort selinux-policy-34.27-1.fc34.noarch selinux-policy-targeted-34.27-1.fc34.noarch systemd-248.10-1.fc34.x86_64 systemd-libs-248.10-1.fc34.x86_64 systemd-networkd-248.10-1.fc34.x86_64 systemd-oomd-defaults-248.10-1.fc34.x86_64 systemd-pam-248.10-1.fc34.x86_64 systemd-rpm-macros-248.10-1.fc34.noarch systemd-udev-248.10-1.fc34.x86_64 # The following SELinux denial appears in permissive mode: ---- type=PROCTITLE msg=audit(05/13/2022 11:00:28.626:439) : proctitle=(bash) type=PATH msg=audit(05/13/2022 11:00:28.626:439) : item=0 name=/dev/pts/1 inode=4 dev=00:19 mode=character,620 ouid=root ogid=tty rdev=88:01 obj=unconfined_u:object_r:user_devpts_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(05/13/2022 11:00:28.626:439) : cwd=/ type=SYSCALL msg=audit(05/13/2022 11:00:28.626:439) : arch=x86_64 syscall=inotify_add_watch success=yes exit=1 a0=0x3 a1=0x55e39a65b100 a2=0x18 a3=0x0 items=1 ppid=1 pid=1123 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(bash) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null) type=AVC msg=audit(05/13/2022 11:00:28.626:439) : avc: denied { watch watch_reads } for pid=1123 comm=(bash) path=/dev/pts/1 dev="devpts" ino=4 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_devpts_t:s0 tclass=chr_file permissive=1 ---- Seen in enforcing mode: # systemd-run --shell Running as unit: run-u21.service Press ^] three times within 1s to disconnect TTY. Finished with result: exit-code Main processes terminated with: code=exited/status=208 Service runtime: 11ms CPU time consumed: 944us # Seen in permissive mode: # systemd-run --shell Running as unit: run-u23.service Press ^] three times within 1s to disconnect TTY. [root@fedora root]# Error on PTY forwarding logic: Operation canceled Finished with result: success CPU time consumed: 7ms # Test coverage for this bug exists in a form of PR: * https://src.fedoraproject.org/tests/selinux/pull-request/301 The PR waits for review. FEDORA-2022-148223ef3b has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-148223ef3b FEDORA-2022-148223ef3b has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-148223ef3b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-148223ef3b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2022-148223ef3b has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report. |