Bug 1655024 - SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'write' accesses on the file /proc/self/fd/16.
Summary: SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'write' accesse...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 29
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:702570e96441e028f2374c8787d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-30 11:00 UTC by Villy Kruse
Modified: 2019-01-17 02:17 UTC (History)
4 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:17:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Villy Kruse 2018-11-30 11:00:54 UTC
Description of problem:
Running systemd-timesyncd.

The problem file is:
271095 system_u:object_r:init_var_lib_t:s0 /var/lib/systemd/timesync/clock

selinux version is:  selinux-policy-3.14.2-43.fc29.noarch
SELinux is preventing /usr/lib/systemd/systemd-timesyncd from 'write' accesses on the file /proc/self/fd/16.

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

If you believe that systemd-timesyncd should be allowed write access on the 16 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                /proc/self/fd/16 [ 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-43.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.19.4-300.fc29.x86_64 #1 SMP Fri
                              Nov 23 13:03:11 UTC 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-11-30 11:45:51 CET
Last Seen                     2018-11-30 11:53:52 CET
Local ID                      ab5cde3c-f9bc-440e-8dcd-d15f9dd41d2b

Raw Audit Messages
type=AVC msg=audit(1543575232.888:241): avc:  denied  { write } for  pid=546 comm="systemd-timesyn" name="clock" dev="sda2" ino=271095 scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1543575232.888:241): arch=x86_64 syscall=utimensat success=yes exit=0 a0=ffffff9c a1=7ffe466501e0 a2=0 a3=0 items=1 ppid=1 pid=546 auid=4294967295 uid=471 gid=446 euid=471 suid=471 fsuid=471 egid=446 sgid=446 fsgid=446 tty=(none) ses=4294967295 comm=systemd-timesyn exe=/usr/lib/systemd/systemd-timesyncd subj=system_u:system_r:systemd_timedated_t:s0 key=(null)

type=CWD msg=audit(1543575232.888:241): cwd=/

type=PATH msg=audit(1543575232.888:241): item=0 name=/proc/self/fd/16 inode=271095 dev=08:02 mode=0100644 ouid=471 ogid=446 rdev=00:00 obj=system_u:object_r:init_var_lib_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0

Hash: systemd-timesyn,systemd_timedated_t,init_var_lib_t,file,write

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

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

Comment 1 Lukas Vrabec 2018-12-18 15:47:25 UTC
Fixed with https://github.com/fedora-selinux/selinux-policy/pull/235

Comment 2 Fedora Update System 2019-01-13 15:45:25 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 3 Fedora Update System 2019-01-14 03:03:34 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 4 Fedora Update System 2019-01-17 02:17:07 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.