Bug 965457 - chronyd can't read /dev/urandom and write to /etc/chrony.keys
Summary: chronyd can't read /dev/urandom and write to /etc/chrony.keys
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-21 09:33 UTC by Miroslav Lichvar
Modified: 2013-05-31 04:25 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.11.1-97.fc18
Clone Of:
Environment:
Last Closed: 2013-05-31 04:25:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Lichvar 2013-05-21 09:33:37 UTC
Description of problem:
A new feature for chrony is being implemented. It will allow automatic generation of the command key, which will make the configuration easier. However, the current selinux policy seems block the access to /dev/urandom and writing to the keys file. I'm getting these errors when trying the new code:

avc:  denied  { read } for  pid=10662 comm="chronyd" name="urandom" dev="devtmpfs" ino=1036 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
avc:  denied  { open } for  pid=10662 comm="chronyd" path="/dev/urandom" dev="devtmpfs" ino=1036 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
avc:  denied  { getattr } for  pid=10662 comm="chronyd" path="/dev/urandom" dev="devtmpfs" ino=1036 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
avc:  denied  { ioctl } for  pid=10662 comm="chronyd" path="/dev/urandom" dev="devtmpfs" ino=1036 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
avc:  denied  { append } for  pid=10662 comm="chronyd" name="chrony.keys" dev="sda1" ino=29474 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:chronyd_keys_t:s0 tclass=file
avc:  denied  { setattr } for  pid=10662 comm="chronyd" name="chrony.keys" dev="sda1" ino=29474 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:chronyd_keys_t:s0 tclass=file
avc:  denied  { fsetid } for  pid=10662 comm="chronyd" capability=4  scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:system_r:chronyd_t:s0 tclass=capability


Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.11.1-91.fc18.noarch

Comment 1 Miroslav Grepl 2013-05-21 12:13:22 UTC
Added.

commit 526efe3632e5c92580e39292a52fccb8b104a93c
Author: Miroslav Grepl <mgrepl>
Date:   Tue May 21 14:13:06 2013 +0200

    Add chronyd support for #965457

Comment 2 Miroslav Lichvar 2013-05-21 13:48:51 UTC
Thanks!

Comment 3 Fedora Update System 2013-05-28 18:58:22 UTC
selinux-policy-3.11.1-97.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-97.fc18

Comment 4 Fedora Update System 2013-05-30 03:00:49 UTC
Package selinux-policy-3.11.1-97.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-97.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9612/selinux-policy-3.11.1-97.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-05-31 04:25:50 UTC
selinux-policy-3.11.1-97.fc18 has been pushed to the Fedora 18 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.