RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2062740 - AVC seen for denied { send_msg } for scontext=guest_u:guest_r:guest_t:s0
Summary: AVC seen for denied { send_msg } for scontext=guest_u:guest_r:guest_t:s0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 9.1
Assignee: Zdenek Pytela
QA Contact: Amith
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-10 12:59 UTC by anuja
Modified: 2022-11-15 12:57 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-34.1.32-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:13:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1183 0 None open Dontaudit guest dbus chat 2022-05-11 10:49:24 UTC
Red Hat Issue Tracker RHELPLAN-115202 0 None None None 2022-03-10 13:09:44 UTC
Red Hat Product Errata RHBA-2022:8283 0 None None None 2022-11-15 11:13:42 UTC

Description anuja 2022-03-10 12:59:46 UTC
Description of problem:

Following AVC denial seen during bash tests with latest IPA build for RHEL9.0

This is a summary AVC file for bash, for each avc.log for specific task, check restraint.01/index.html
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33
selinux-policy-34.1.27-1.el9.noarch
----
time->Wed Mar  9 09:40:41 2022
type=USER_AVC msg=audit(1646836841.192:4277): pid=662 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=guest_u:guest_r:guest_t:s0 tcontext=system_u:system_r:systemd_hostnamed_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-broker" sauid=81 hostname=? addr=? terminal=?'

Comment 2 Milos Malik 2022-03-11 17:24:50 UTC
Following SELinux denial appeared in enforcing mode:
----
type=USER_AVC msg=audit(03/11/2022 18:18:22.163:380) : pid=681 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=guest_u:guest_r:guest_t:s0 tcontext=system_u:system_r:systemd_hostnamed_t:s0 tclass=dbus permissive=0  exe=/usr/bin/dbus-broker sauid=dbus hostname=? addr=? terminal=?' 
----

Following SELinux denials appeared in permissive mode:
----
type=USER_AVC msg=audit(03/11/2022 18:19:41.337:468) : pid=681 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=guest_u:guest_r:guest_t:s0 tcontext=system_u:system_r:rtkit_daemon_t:s0 tclass=dbus permissive=1  exe=/usr/bin/dbus-broker sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(03/11/2022 18:19:41.435:475) : pid=681 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for  scontext=guest_u:guest_r:guest_t:s0 tcontext=system_u:system_r:systemd_hostnamed_t:s0 tclass=dbus permissive=1  exe=/usr/bin/dbus-broker sauid=dbus hostname=? addr=? terminal=?' 
----

# rpm -qa selinux\* 
selinux-policy-34.1.27-1.el9.noarch
selinux-policy-devel-34.1.27-1.el9.noarch
selinux-policy-targeted-34.1.27-1.el9.noarch
#

Comment 3 Milos Malik 2022-03-11 17:30:16 UTC
# ps -efZ | grep 681
system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 dbus 681 674  0 18:16 ?    00:00:00 dbus-broker --log 4 --controller 9 --machine-id 2b3cc966022746d69eff961690e0e215 --max-bytes 536870912 --max-fds 4096 --max-matches 131072 --audit
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 8515 4357  0 18:28 pts/0 00:00:00 grep --color=auto 681
# ls -Z `which dbus-broker`
system_u:object_r:dbusd_exec_t:s0 /usr/bin/dbus-broker
# sesearch -s guest_t -t dbusd_exec_t -T
#

Comment 4 Zdenek Pytela 2022-03-14 08:43:14 UTC
Current RHEL 9 state:

# sesearch -A -s userdomain -t systemd_hostnamed_t -c dbus -p send_msg --dontaudit
allow dbusd_unconfined nsswitch_domain:dbus send_msg;
allow staff_t systemd_hostnamed_t:dbus send_msg;
allow sysadm_t systemd_hostnamed_t:dbus send_msg;
allow user_t systemd_hostnamed_t:dbus send_msg;
dontaudit xguest_t systemd_domain:dbus send_msg;

# sesearch -A -s userdomain -t rtkit_daemon_t -c dbus -p send_msg --dontaudit
allow dbusd_unconfined nsswitch_domain:dbus send_msg;
allow dbusd_unconfined system_bus_type:dbus send_msg;
allow staff_usertype rtkit_daemon_t:dbus send_msg;
allow sysadm_t rtkit_daemon_t:dbus send_msg;
allow user_usertype rtkit_daemon_t:dbus send_msg;
allow wine_domain rtkit_daemon_t:dbus send_msg;
allow xguest_usertype rtkit_daemon_t:dbus send_msg;
dontaudit xguest_t system_bus_type:dbus send_msg;(In reply to anuja from comment #0)

# sesearch -s userdomain -t dbusd_exec_t -T
type_transition staff_t dbusd_exec_t:process staff_dbusd_t;
type_transition staff_wine_t dbusd_exec_t:process staff_dbusd_t;
type_transition sysadm_t dbusd_exec_t:process sysadm_dbusd_t;
type_transition unconfined_t dbusd_exec_t:process unconfined_dbusd_t;
type_transition user_t dbusd_exec_t:process user_dbusd_t;
type_transition user_wine_t dbusd_exec_t:process user_dbusd_t;
type_transition xguest_t dbusd_exec_t:process xguest_dbusd_t;

# seinfo -xt guest_dbusd_t

Types: 0


> Following AVC denial seen during bash tests with latest IPA build for RHEL9.0
Apart from the denials, did you also notice some problems with services or usage?

Comment 5 anuja 2022-03-22 08:45:11 UTC
No only AVC failures are reported from test-suite

Comment 13 errata-xmlrpc 2022-11-15 11:13:14 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:8283


Note You need to log in before you can comment on or make changes to this bug.