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 2124388 - confined users staff_u are creating AVC errors for dbus at GUI login
Summary: confined users staff_u are creating AVC errors for dbus at GUI login
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.6
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.8
Assignee: Zdenek Pytela
QA Contact: Milos Malik
Petr Hybl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-06 00:52 UTC by Daniel Reynolds
Modified: 2023-05-16 11:02 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.3-109.el8
Doc Type: Bug Fix
Doc Text:
.Confined users now can log in without a reported denial Previously, SELinux policy did not allow all permissions needed to log in a SELinux confined user using GUI. Consequently, AVC denials were audited and some services like `dbus` or `pulseaudio` did not work properly. With this update, the SELinux policy has been updated with new rules for confined users.
Clone Of:
Environment:
Last Closed: 2023-05-16 09:04:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1430 0 None open Allow login_userdomain dbus chat with rhsmcertd 2022-10-05 17:56:19 UTC
Red Hat Issue Tracker RHELPLAN-133269 0 None None None 2022-09-06 00:55:50 UTC
Red Hat Product Errata RHBA-2023:2965 0 None None None 2023-05-16 09:04:37 UTC

Description Daniel Reynolds 2022-09-06 00:52:32 UTC
Description of problem:
- Customer is migrating users to be SELinux confined users staff_u.
- When logging into GUI, SELinux AVC errors are generated.

Version-Release number of selected component (if applicable):
- pulseaudio-14.0-3.el8_6.x86_64
- selinux-policy-3.14.3-95.el8_6.4.noarch
- dbus-1.12.8-18.el8_6.1.x86_64

How reproducible: Always


Steps to Reproduce:
1. Create test user
    sudo useradd --groups wheel --selinux-user staff_u test-staff
    sudo passwd test-staff XXXXX
2. Login to test-staff via GUI.
3. Show selinux AVC,AVC_USER errors
    sudo ausearch -m avc,user_avc



Actual results:
- Will see AVC errors for pulseaudio and dbus.
- pulseaudio AVC errors do no reappear on second login, dbus errors do.

pulseaudio AVC errors generated.  Do not occur on second login.
    [snip]
    ----
    time->Tue Sep  6 10:10:41 2022
    type=PROCTITLE msg=audit(1662423041.867:247): proctitle=2F7573722F62696E2F70756C7365617564696F002D2D6461656D6F6E697A653D6E6F002D2D6C6F672D7461726765743D6A6F75726E616C
    type=SYSCALL msg=audit(1662423041.867:247): arch=c000003e syscall=83 success=no exit=-13 a0=55f276de08b0 a1=1c0 a2=ffffffff a3=0 items=0 ppid=3074 pid=3094 auid=1001 uid=1001 gid=1002 euid=1001 suid=1001 fsuid=1001 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=5 comm="pulseaudio" exe="/usr/bin/pulseaudio" subj=staff_u:staff_r:pulseaudio_t:s0-s0:c0.c1023 key=(null)
    type=AVC msg=audit(1662423041.867:247): avc:  denied  { create } for  pid=3094 comm="pulseaudio" name=".config" scontext=staff_u:staff_r:pulseaudio_t:s0-s0:c0.c1023 tcontext=staff_u:object_r:config_home_t:s0 tclass=dir permissive=0
    [snip]
    ----

dbus AVC errors immidiately after pulseaudio errors.  These always reoccur.

    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.715:294): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.745:295): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.781:296): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.805:297): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.810:298): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.825:299): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.839:300): pid=896 uid=81 auid=4294967295 ses=4294967295 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.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    time->Tue Sep  6 10:12:05 2022
    type=USER_AVC msg=audit(1662423125.839:301): pid=896 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=com.redhat.RHSM1.Config member=GetAll dest=:1.386 spid=4090 tpid=2540 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=0  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    ----
    [snip]


Expected results:
No AVC errors generated.


Additional info:

Opened up two bugs.
1. one for pulseaudio -- 2124387
2. another for dbus -- this

Feel free to close 2124387 if two bug reports are not required.

Comment 1 Zdenek Pytela 2022-09-06 06:37:39 UTC
Should be resolved with using the rhsmcertd_dbus_chat() interface for login_userdomain.

Comment 2 Milos Malik 2022-10-03 16:28:55 UTC
Caught in permissive mode:
----
type=USER_AVC msg=audit(10/03/2022 18:25:28.555:576) : pid=930 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.158 spid=10257 tpid=1376 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rhsmcertd_t:s0 tclass=dbus permissive=1  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(10/03/2022 18:25:28.718:577) : pid=930 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_return dest=:1.2630 spid=1376 tpid=10257 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tclass=dbus permissive=1  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----

Comment 3 Zdenek Pytela 2022-10-05 18:55:44 UTC
To backport:
commit 14a208a78ed843964f8f79903d130760aa7a9a4e
Author: Zdenek Pytela <zpytela>
Date:   Wed Oct 5 19:53:23 2022 +0200

    Allow login_userdomain dbus chat with rhsmcertd

Comment 17 errata-xmlrpc 2023-05-16 09:04:16 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-2023:2965


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