Bug 1963216

Summary: SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'getattr' accesses on the lnk_file /var/lib/systemd/timesync.
Product: Red Hat Enterprise Linux 8 Reporter: Zdenek Pytela <zpytela>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: lvrabec, mmalik, plautrba, ssekidde
Target Milestone: betaKeywords: Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2bac8600a45364a6fcddf6ccf532da50f72d0397913139a50205538219d462cb;VARIANT_ID=workstation;
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1649666 Environment:
Last Closed: 2021-07-01 15:22:03 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:
Bug Depends On: 1649666    
Bug Blocks:    

Description Zdenek Pytela 2021-05-21 17:10:40 UTC
+++ This bug was initially created as a clone of Bug #1649666 +++

Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'getattr' accesses on the lnk_file /var/lib/systemd/timesync.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-timesyncd should be allowed getattr access on the timesync lnk_file 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-timesyn' --raw | audit2allow -M my-systemdtimesyn
# semodule -X 300 -i my-systemdtimesyn.pp

Additional Information:
Source Context                system_u:system_r:systemd_timedated_t:s0
Target Context                system_u:object_r:init_var_lib_t:s0
Target Objects                /var/lib/systemd/timesync [ lnk_file ]
Source                        systemd-timesyn
Source Path                   /usr/lib/systemd/systemd-timesyncd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-udev-239-6.git9f3aed1.fc29.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-42.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.18.17-300.fc29.x86_64 #1 SMP Mon
                              Nov 5 17:56:16 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-11-14 12:59:17 IST
Last Seen                     2018-11-14 12:59:17 IST
Local ID                      ca0f7360-7ab9-4628-a66c-6cb4857d309a

Raw Audit Messages
type=AVC msg=audit(1542180557.269:85): avc:  denied  { getattr } for  pid=741 comm="systemd-timesyn" path="/var/lib/systemd/timesync" dev="sda3" ino=1444885 scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=lnk_file permissive=1


type=SYSCALL msg=audit(1542180557.269:85): arch=x86_64 syscall=lstat success=yes exit=0 a0=55d11875619c a1=7ffc12acb500 a2=7ffc12acb500 a3=0 items=0 ppid=1 pid=741 auid=4294967295 uid=963 gid=963 euid=963 suid=963 fsuid=963 egid=963 sgid=963 fsgid=963 tty=(none) ses=4294967295 comm=systemd-timesyn exe=/usr/lib/systemd/systemd-timesyncd subj=system_u:system_r:systemd_timedated_t:s0 key=(null)

Hash: systemd-timesyn,systemd_timedated_t,init_var_lib_t,lnk_file,getattr

Version-Release number of selected component:
selinux-policy-3.14.2-42.fc29.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.6
hashmarkername: setroubleshoot
kernel:         4.18.17-300.fc29.x86_64
type:           libreport

--- Additional comment from Lukas Vrabec on 2018-12-17 19:41:02 CET ---

This PR should fix this bug:
https://github.com/fedora-selinux/selinux-policy/pull/235

--- Additional comment from Lukas Vrabec on 2018-12-17 19:41:36 CET ---



--- Additional comment from Fedora Update System on 2019-01-13 16:44:33 CET ---

selinux-policy-3.14.2-46.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6a20cfef61

--- Additional comment from Fedora Update System on 2019-01-14 04:02:52 CET ---

selinux-policy-3.14.2-46.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6a20cfef61

--- Additional comment from Fedora Update System on 2019-01-17 03:16:19 CET ---

selinux-policy-3.14.2-46.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Zdenek Pytela 2021-07-01 15:22:03 UTC
Closing this bz as it turned out not to be a current RHEL 8 bug in the end.