Bug 2000488

Summary: Confined sysadm users cannot execute "realm list" command
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: lvrabec, mmalik, ssekidde
Target Milestone: rcKeywords: Triaged
Target Release: 8.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.14.3-83.el8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 15:15:05 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:
Bug Depends On:    
Bug Blocks: 1778780    

Description Renaud Métrich 2021-09-02 09:19:30 UTC
Description of problem:

sysadm_t doesn't have the capability of sending DBus messages to realmd_t type (used by realmd daemon):

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# sesearch -A -s sysadm_t -t realmd_t -c dbus -p send_msg
--> no rule
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Related USER_AVC:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
type=USER_AVC msg=audit(07/28/2021 11:02:36.395:184922) : pid=1787 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.DBus.Properties member=GetAll dest=:1.22238 spid=8937 tpid=8941 scontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:realmd_t:s0 tclass=dbus  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This hence prevents confined admins from executing "realm list" and other commands.
See also related BZ #1965251 for a generic solution.


Version-Release number of selected component (if applicable):

RHEL7 and 8


How reproducible:

Always

Comment 1 Zdenek Pytela 2021-11-09 17:52:59 UTC
To backport:
commit f119cd1331e8c09018216887bf0fb35e48fd91e4 (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Mon Nov 8 14:47:12 2021 +0100

    Allow sysadm_t dbus chat with realmd_t

Comment 11 errata-xmlrpc 2022-05-10 15:15:05 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 (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-2022:1995