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 1688671 - SELinux is preventing init_t to read session_dbusd_tmp_t directories
Summary: SELinux is preventing init_t to read session_dbusd_tmp_t directories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.2
Hardware: All
OS: Linux
medium
high
Target Milestone: rc
: 8.1
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1766464 (view as bug list)
Depends On: 1673107
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-14 08:06 UTC by Cédric Jeanneret
Modified: 2020-11-14 14:08 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.14.3-6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:10:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1820019 0 None None None 2019-03-14 08:07:59 UTC
Red Hat Product Errata RHBA-2019:3547 0 None None None 2019-11-05 22:11:39 UTC

Description Cédric Jeanneret 2019-03-14 08:06:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rpm-plugin-systemd-inhibit-4.14.2-9.el8.x86_64                                                                                                                                                                                                
python3-systemd-234-8.el8.x86_64                                                                                                                                                                                                              
systemd-libs-239-13.el8.x86_64                                                                                                                                                                                                                
systemd-pam-239-13.el8.x86_64                                                                                                                                                                                                                 
systemd-udev-239-13.el8.x86_64                                                                                                                                                                                                                
systemd-239-13.el8.x86_64                                                                                                                                                                                                                     
oci-systemd-hook-0.1.15-2.git2d0b8a3.module+el8+2769+577ad176.x86_64                                                                                                                                                                          

How reproducible:
Always


Steps to Reproduce:
1. Install a rhel8 system
2. Deploy RHOSP-15
3.

Actual results:
audit.log is spammed with:
type=AVC msg=audit(1552550628.422:5188): avc:  denied  { read } for  pid=95952 comm="systemd-user-ru" name="dbus-1" dev="tmpfs" ino=605557 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:session_dbusd_tmp_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1552550628.423:5189): avc:  denied  { read } for  pid=95952 comm="systemd-user-ru" name="dbus-1" dev="tmpfs" ino=605557 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:session_dbusd_tmp_t:s0 tclass=dir permissive=0

Expected results:
Nothing like this should show up

Additional info:
journald log shows:
Mar 14 08:03:49 undercloud.localdomain setroubleshoot[95890]: SELinux is preventing /usr/lib/systemd/systemd-user-runtime-dir from read access on the directory dbus-1. For complete SELinux messages run: sealert -l d74972a4-9c79-48f7-83b3->
Mar 14 08:03:49 undercloud.localdomain platform-python[95890]: SELinux is preventing /usr/lib/systemd/systemd-user-runtime-dir from read access on the directory dbus-1.
                                                               
                                                               *****  Plugin catchall (100. confidence) suggests   **************************
                                                               
                                                               If you believe that systemd-user-runtime-dir should be allowed read access on the dbus-1 directory by default.
                                                               Then you should report this as a bug.
                                                               You can generate a local policy module to allow this access.
                                                               Do
                                                               allow this access for now by executing:
                                                               # ausearch -c 'systemd-user-ru' --raw | audit2allow -M my-systemduserru
                                                               # semodule -X 300 -i my-systemduserru.pp


The policy looks like:
allow init_t session_dbusd_tmp_t:dir read;

I'm not sure we won't need write or other rights (will test on my own and report update here).

Thank you for your support!

Cheers,

C.

Comment 5 Milos Malik 2019-04-26 08:58:47 UTC
Is it possible that the directory (mentioned in comment#0) was mislabeled ?

# find /run/ -context \*session_dbusd_tmp_t\*
/run/user/0/dbus-1
/run/user/0/dbus-1/services
/run/user/42/dbus-1
/run/user/42/dbus-1/services
# restorecon -Rv /run/
Relabeled /run/user/0/dbus-1 from unconfined_u:object_r:session_dbusd_tmp_t:s0 to unconfined_u:object_r:user_tmp_t:s0
Relabeled /run/user/0/dbus-1/services from unconfined_u:object_r:session_dbusd_tmp_t:s0 to unconfined_u:object_r:user_tmp_t:s0
Relabeled /run/user/42/dbus-1 from unconfined_u:object_r:session_dbusd_tmp_t:s0 to unconfined_u:object_r:user_tmp_t:s0
Relabeled /run/user/42/dbus-1/services from unconfined_u:object_r:session_dbusd_tmp_t:s0 to unconfined_u:object_r:user_tmp_t:s0
#

Comment 6 Lukas Vrabec 2019-05-17 21:18:31 UTC
commit 1f11e1d145b299da5899271b7af4f4b2bb3c2dea (HEAD -> rhel8.1-base, origin/rhel8.1-base)
Author: Lukas Vrabec <lvrabec>
Date:   Fri May 17 23:16:50 2019 +0200

    Allow init_t to manage session_dbusd_tmp_t dirs
    Resolves: rhbz#1688671

commit ad0ca80e163eb102b1fc9eb6322d82577c4c5ac8 (HEAD -> rhel8.1-contrib, origin/rhel8.1-contrib)
Author: Lukas Vrabec <lvrabec>
Date:   Fri May 17 23:14:55 2019 +0200

    Label /var/run/user/*/dbus-1 as session_dbusd_tmp_t
    Resolves:rhbz#1688671

Comment 9 Lukas Vrabec 2019-10-29 11:41:46 UTC
*** Bug 1766464 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2019-11-05 22:10:18 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, 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-2019:3547


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