Bug 1425466 - chronyd not allowed to read /etc/adjtime
Summary: chronyd not allowed to read /etc/adjtime
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-21 13:47 UTC by Miroslav Lichvar
Modified: 2017-05-02 13:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-02 13:55:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Lichvar 2017-02-21 13:47:46 UTC
Description of problem:
When chronyd is configured with the rtcfile directive, it tries to read /etc/adjtime in order to determine whether the RTC is keeping time in UTC or local time, but that fails due to SELinux.

Errors in the permissive mode:

type=AVC msg=audit(1487684658.011:50511): avc:  denied  { read } for  pid=14299 comm="chronyd" name="adjtime" dev="sda1" ino=33610853 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:adjtime_t:s0 tclass=file permissive=1
type=AVC msg=audit(1487684658.011:50512): avc:  denied  { open } for  pid=14299 comm="chronyd" path="/etc/adjtime" dev="sda1" ino=33610853 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:adjtime_t:s0 tclass=file permissive=1
type=AVC msg=audit(1487684658.011:50513): avc:  denied  { getattr } for  pid=14299 comm="chronyd" path="/etc/adjtime" dev="sda1" ino=33610853 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:adjtime_t:s0 tclass=file permissive=1        

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-225.6.fc25.noarch

How reproducible:
Always

Steps to Reproduce:
1. replace "rtcsync" in /etc/chrony.conf with "rtcfile /var/lib/chrony/rtc"
2. restart chronyd

Comment 1 Miroslav Lichvar 2017-04-10 09:30:47 UTC
It seems this was fixed in 3.13.1-225.12.fc25 and 3.13.1-244.fc26. Thanks!


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