Bug 2112729
| Summary: | Confined SELinux user 'staff_u' cannot run probes from scap-workbench if privilege escalation performed by polkit | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Daniel Reynolds <dareynol> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | low | Docs Contact: | Petr Hybl <phybl> |
| Priority: | low | ||
| Version: | unspecified | CC: | lvrabec, mjahoda, mmalik, phybl, zpytela |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 9.3 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-38.1.16-1.el9 | Doc Type: | Bug Fix |
| Doc Text: |
.Users in the `staff_r` SELinux role can now run `scap_workbench` probes
Previously, the `selinux-policy` packages did not contain rules for users in the `staff_r` SELinux role required to run the `scap-workbench` utility. Consequently, `scap-workbench` probes failed when run by user in the `staff_r` SELinux role. With this update, the missing rules have been added to `selinux-policy`, and SELinux users can now run `scap_workbench` probes.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-07 08:52:15 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
Daniel Reynolds
2022-08-01 01:28:45 UTC
Daniel, Can you describe which instructions were followed to get to this setup? From SELinux perspective the problem is that a Linux user in the staff_r role is a SELinux confined user, while a SELinux confined administrator rather has the sysadm_r role (and a few dedicated ones which probably do not apply here). https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/managing-confined-and-unconfined-users_using-selinux Hello Zdenek
Re
> Can you describe which instructions were followed to get to this setup?
1. Cu has started to migrate users to staff_u.
2. To run administrative commands they use the following configuration
Users assigned to 'wheel' group.
The following configuration in /etc/sudoers to allow the transition; staff_r -> sysadm_t.
~~~
%wheel_sysadm ALL=(ALL) ROLE=sysadm_r TYPE=sysadm_r ALL
~~~
3. Works for most administrative functions.
4. Using scap-workbench from GUI.
scap-workbench does not use 'sudo' for privilege escalation to root, uses polkit.
polkit does not perform transition from staff_r -> sysadm_r.
polkit probe runs as staff_r instead of sysadm_r. Most of the probe fails with AVC denials despite running as root.
5. As a work around, user is running scap-workbench via sudo.
Regards.
Correction to above /etc/sudoers configuration is as follows ~~~ %wheel_sysadm ALL=(ALL) ROLE=sysadm_r TYPE=sysadm_t ALL ~~~ Hi Daniel, can you please attach AVC messages? Thanks Nikola Supplied AVC as requested. See above. Commit to bckport: 3d4190dbd (HEAD -> rawhide, upstream/rawhide) Add list_dir_perms to kerberos_read_keytab 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:6617 |