Bug 1649668 - SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'read' accesses on the directory links.
Summary: SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'read' accesses...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 29
Hardware: x86_64
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b069f17c1bbacab311f9f4be39e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-14 08:02 UTC by Sumit Bhardwaj
Modified: 2020-05-12 08:58 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.2-46.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-17 02:16:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sumit Bhardwaj 2018-11-14 08:02:49 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'read' accesses on the directory links.

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

If you believe that systemd-timesyncd should be allowed read access on the links 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-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:systemd_networkd_var_run_t:s0
Target Objects                links [ dir ]
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                      7eb36777-83dd-44b6-8fd6-311c980a5da0

Raw Audit Messages
type=AVC msg=audit(1542180557.270:87): avc:  denied  { read } for  pid=741 comm="systemd-timesyn" name="links" dev="tmpfs" ino=14873 scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:object_r:systemd_networkd_var_run_t:s0 tclass=dir permissive=1


type=SYSCALL msg=audit(1542180557.270:87): arch=x86_64 syscall=inotify_add_watch success=yes exit=EPERM a0=b a1=7fae1f83d6af a2=280 a3=7ffc12acb53c 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,systemd_networkd_var_run_t,dir,read

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

Comment 1 Villy Kruse 2018-12-15 08:39:48 UTC
Description of problem:
Runnint systemd-timesyncd causes this issue.

The file involved is:

1751 system_u:object_r:systemd_networkd_var_run_t:s0 /run/systemd/netif/links

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

Additional info:
reporter:       libreport-2.9.7
hashmarkername: setroubleshoot
kernel:         4.19.8-300.fc29.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2019-01-08 13:12:35 UTC
commit 1e340794f40830e16753caafb53c8f5349dd7276
Author: Lukas Vrabec <lvrabec>
Date:   Tue Nov 6 16:14:15 2018 +0100

    Update systemd_timedated_t domain to allow create own pid files/access init_var_lib_t files and read dbus files BZ(1646202)

Comment 3 Fedora Update System 2019-01-13 15:45:10 UTC
selinux-policy-3.14.2-46.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6a20cfef61

Comment 4 Fedora Update System 2019-01-14 03:03:23 UTC
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

Comment 5 Fedora Update System 2019-01-17 02:16:52 UTC
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.


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