Bug 2091275 - SELinux is preventing chronyd from 'getattr' accesses on the file /run/NetworkManager/no-stub-resolv.conf.
Summary: SELinux is preventing chronyd from 'getattr' accesses on the file /run/Networ...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 36
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Nikola Knazekova
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:19b1b5a29db252c74c851feb11f...
: 2088982 2093556 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2022-05-28 12:36 UTC by Sam Varshavchik
Modified: 2022-10-12 13:01 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-36.16-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-10-12 13:01:34 UTC
Type: ---

Attachments (Terms of Use)

Description Sam Varshavchik 2022-05-28 12:36:53 UTC
Description of problem:
AVC alert after removing systemd-resolved and installing a symlink from /etc/resolv.conf to ../run/systemd/resolve/stub-resolv.conf
SELinux is preventing chronyd from 'getattr' accesses on the file /run/NetworkManager/no-stub-resolv.conf.

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

If you believe that chronyd should be allowed getattr access on the no-stub-resolv.conf file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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:NetworkManager_var_run_t:s0
Target Objects                /run/NetworkManager/no-stub-resolv.conf [ file ]
Source                        chronyd
Source Path                   chronyd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.8-2.fc36.noarch
Local Policy RPM              selinux-policy-targeted-36.8-2.fc36.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.17.9-300.fc36.x86_64 #1 SMP
                              PREEMPT Wed May 18 15:08:23 UTC 2022 x86_64 x86_64
Alert Count                   4
First Seen                    2022-05-28 08:29:29 EDT
Last Seen                     2022-05-28 08:30:25 EDT
Local ID                      00873bad-debc-47f7-b0cf-3846daca5f49

Raw Audit Messages
type=AVC msg=audit(1653741025.103:282): avc:  denied  { getattr } for  pid=856 comm="chronyd" path="/run/NetworkManager/no-stub-resolv.conf" dev="tmpfs" ino=1525 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:NetworkManager_var_run_t:s0 tclass=file permissive=0

Hash: chronyd,chronyd_t,NetworkManager_var_run_t,file,getattr

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.17.9-300.fc36.x86_64
type:           libreport

Comment 1 Sam Varshavchik 2022-05-28 12:42:39 UTC

lrwxrwxrwx. 1 root root 41 May 28 08:27 /etc/resolv.conf -> ../run/NetworkManager/no-stub-resolv.conf

Comment 2 Ian Pilcher 2022-05-28 14:27:57 UTC
I'm running F36 without systemd-resolved (RPM not installed) and chronyd is running just fine.  I don't see this AVC,

Comment 3 Nikola Knazekova 2022-09-07 13:49:45 UTC
*** Bug 2088982 has been marked as a duplicate of this bug. ***

Comment 4 Zdenek Pytela 2022-09-12 15:09:41 UTC
*** Bug 2093556 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2022-09-30 08:49:49 UTC
FEDORA-2022-0c59a07653 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0c59a07653

Comment 6 Fedora Update System 2022-10-01 02:12:56 UTC
FEDORA-2022-0c59a07653 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-0c59a07653`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0c59a07653

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

Comment 7 Fedora Update System 2022-10-12 13:01:34 UTC
FEDORA-2022-0c59a07653 has been pushed to the Fedora 36 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.