Bug 1945294

Summary: SELinux is preventing dbus-daemon from 'watch' accesses on the directory /var/lib/flatpak/exports/share/dbus-1/services.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2fcb90f11dc88a754e4d71e548e39223f432ded3ac384b6eb61212b27de1bed3;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-31 18:53:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikhail 2021-03-31 15:42:13 UTC
Description of problem:
SELinux is preventing dbus-daemon from 'watch' accesses on the directory /var/lib/flatpak/exports/share/dbus-1/services.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow dbus-daemon to have watch access on the services directory
Then you need to change the label on /var/lib/flatpak/exports/share/dbus-1/services
Do
# semanage fcontext -a -t FILE_TYPE '/var/lib/flatpak/exports/share/dbus-1/services'
where FILE_TYPE is one of the following: dbusd_etc_t, system_dbusd_tmp_t, system_dbusd_tmpfs_t, system_dbusd_var_run_t, usr_t.
Then execute:
restorecon -v '/var/lib/flatpak/exports/share/dbus-1/services'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that dbus-daemon should be allowed watch access on the services 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 'dbus-daemon' --raw | audit2allow -M my-dbusdaemon
# semodule -X 300 -i my-dbusdaemon.pp

Additional Information:
Source Context                system_u:system_r:system_dbusd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib/flatpak/exports/share/dbus-1/services [
                              dir ]
Source                        dbus-daemon
Source Path                   dbus-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.8-7.fc35.noarch
Local Policy RPM              selinux-policy-targeted-3.14.8-7.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.12.0-0.rc5.180.fc35.x86_64+debug
                              #1 SMP Mon Mar 29 15:13:57 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-03-31 19:59:17 +05
Last Seen                     2021-03-31 19:59:17 +05
Local ID                      20c75d3c-b975-42dc-b2b7-7609f6eadff4

Raw Audit Messages
type=AVC msg=audit(1617202757.132:538): avc:  denied  { watch } for  pid=1543 comm="dbus-daemon" path="/var/lib/flatpak/exports/share/dbus-1/services" dev="nvme0n1p2" ino=8913163 scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=1


Hash: dbus-daemon,system_dbusd_t,var_lib_t,dir,watch

Version-Release number of selected component:
selinux-policy-targeted-3.14.8-7.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.12.0-0.rc5.180.fc35.x86_64+debug
type:           libreport

Comment 1 Zdenek Pytela 2021-03-31 18:53:56 UTC

*** This bug has been marked as a duplicate of bug 1928548 ***