Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2043293 - SELinux is preventing chronyd from 'read' accesses on the directory chrony-dhcp.
Summary: SELinux is preventing chronyd from 'read' accesses on the directory chrony-dhcp.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 35
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:958b6824593d1ef51e7c4201f7d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-21 00:10 UTC by Thomas Köller
Modified: 2022-04-10 19:52 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-35.16-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-10 19:52:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Thomas Köller 2022-01-21 00:10:14 UTC
Description of problem:
Happens frequently
SELinux is preventing chronyd from 'read' accesses on the directory chrony-dhcp.

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

If you believe that chronyd should be allowed read access on the chrony-dhcp 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 'chronyd' --raw | audit2allow -M my-chronyd
# semodule -X 300 -i my-chronyd.pp

Additional Information:
Source Context                system_u:system_r:chronyd_t:s0
Target Context                system_u:object_r:dhcpc_var_run_t:s0
Target Objects                chrony-dhcp [ dir ]
Source                        chronyd
Source Path                   chronyd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.8-1.fc35.noarch
Local Policy RPM              selinux-policy-targeted-35.8-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.15.14-200.fc35.x86_64 #1 SMP Tue
                              Jan 11 16:49:27 UTC 2022 x86_64 x86_64
Alert Count                   1453
First Seen                    2021-12-20 14:04:57 CET
Last Seen                     2022-01-21 00:45:45 CET
Local ID                      bf674073-2703-4c13-9d8f-7d85ca2edad8

Raw Audit Messages
type=AVC msg=audit(1642722345.128:73558): avc:  denied  { read } for  pid=1086 comm="chronyd" name="chrony-dhcp" dev="tmpfs" ino=2334 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:dhcpc_var_run_t:s0 tclass=dir permissive=1


Hash: chronyd,chronyd_t,dhcpc_var_run_t,dir,read

Version-Release number of selected component:
selinux-policy-targeted-35.8-1.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.15.2
hashmarkername: setroubleshoot
kernel:         5.15.14-200.fc35.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2022-02-21 13:40:13 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/1090

Comment 2 Thomas Köller 2022-03-31 09:03:01 UTC
There is still an issue with this. The policy does not seem to be applied, unless 'fixfiles restore' is invoked manually:

[root@sarkovy ~]# fixfiles check /run
Would relabel /run/chrony-dhcp from system_u:object_r:dhcpc_var_run_t:s0 to system_u:object_r:chronyd_var_run_t:s0

Comment 3 Zdenek Pytela 2022-03-31 09:07:07 UTC
This has been fixed in F36/F37, but has not been backported to F35 yet.

Comment 4 Fedora Update System 2022-04-06 15:24:36 UTC
FEDORA-2022-9681e66715 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9681e66715

Comment 5 Fedora Update System 2022-04-06 19:48:40 UTC
FEDORA-2022-9681e66715 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-9681e66715`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9681e66715

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-04-10 19:52:22 UTC
FEDORA-2022-9681e66715 has been pushed to the Fedora 35 stable repository.
If problem still persists, 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.