Bug 1529386 - SELinux is preventing NetworkManager from 'getattr' accesses on the file /var/lib/expressvpn/resolv.conf.
Summary: SELinux is preventing NetworkManager from 'getattr' accesses on the file /var...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f6676aa225bced825de7c88ab35...
: 1647439 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-27 21:21 UTC by abyss.7
Modified: 2019-02-14 11:47 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-02 20:07:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description abyss.7 2017-12-27 21:21:32 UTC
Description of problem:
SELinux is preventing NetworkManager from 'getattr' accesses on the file /var/lib/expressvpn/resolv.conf.

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

If you believe that NetworkManager should be allowed getattr access on the resolv.conf 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 'NetworkManager' --raw | audit2allow -M my-NetworkManager
# semodule -X 300 -i my-NetworkManager.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib/expressvpn/resolv.conf [ file ]
Source                        NetworkManager
Source Path                   NetworkManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.17.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.8-300.fc27.x86_64 #1 SMP Wed
                              Dec 20 19:00:18 UTC 2017 x86_64 x86_64
Alert Count                   23
First Seen                    2017-12-22 21:05:38 MSK
Last Seen                     2017-12-27 21:57:57 MSK
Local ID                      50e426fa-b983-46b4-99fd-521f72d43abf

Raw Audit Messages
type=AVC msg=audit(1514401077.266:443): avc:  denied  { getattr } for  pid=964 comm="NetworkManager" path="/var/lib/expressvpn/resolv.conf" dev="sda3" ino=375126 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: NetworkManager,NetworkManager_t,var_lib_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-283.17.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.8-300.fc27.x86_64
type:           libreport

Comment 1 abyss.7 2018-01-11 07:01:44 UTC
Only after viewing my bug in bugzilla, I found out that the report is about '/var/lib/expressvpn/resolv.conf' - while SELinux Troubleshooter mentions it as 'resolv.conf' everywhere.

Comment 2 Pablo Reyes 2018-02-01 01:32:30 UTC
I am experiencing the same problem maifesting from the following Source Process:
NetworkManager, chronyd, sssd, mktemp, sssd_be, dnsmasq, geoclue.

The following are the details from SELinux Alert Browser for NetworkManager it also involves /var/lib/expressvpn/resolv.conf

SELinux is preventing NetworkManager from getattr access on the file /var/lib/expressvpn/resolv.conf.

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

If you believe that NetworkManager should be allowed getattr access on the resolv.conf 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 'NetworkManager' --raw | audit2allow -M my-NetworkManager
# semodule -X 300 -i my-NetworkManager.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib/expressvpn/resolv.conf [ file ]
Source                        NetworkManager
Source Path                   NetworkManager
Port                          <Unknown>
Host                          
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.21.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     gazp9.local.net
Platform                      Linux  4.14.14-300.fc27.x86_64 #1
                              SMP Fri Jan 19 13:19:54 UTC 2018 x86_64 x86_64
Alert Count                   136
First Seen                    2018-01-11 15:04:19 EST
Last Seen                     2018-01-31 20:20:14 EST
Local ID                      

Raw Audit Messages
type=AVC msg=audit(1517448014.586:1279): avc:  denied  { getattr } for  pid=1265 comm="NetworkManager" path="/var/lib/expressvpn/resolv.conf" dev="dm-0" ino=139417870 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: NetworkManager,NetworkManager_t,var_lib_t,file,getattr

Comment 3 phraznikov 2018-02-13 20:06:55 UTC
Description of problem:
I'm not sure what the cause is. I installed Fedora 27 from a USB live image (...I didn't verify the checksum, hence my slight concern -- I'll never do that again!). I've been getting SELinux security alerts (AVC denial) several times a day, mostly NetworkManager making a read or getattr request to resolv.conf. Because I don't understand it, I don't just want to grant access (even though from what I've read it seems pretty inocuous). 

I've been using VLC, Google Chrome, and ExpressVPN mostly. Not sure if any of that software is related to the problem. Thanks.

Version-Release number of selected component:
selinux-policy-3.13.1-283.24.fc27.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.18-300.fc27.x86_64
type:           libreport

Comment 4 Lukas Vrabec 2018-02-19 15:57:33 UTC
Are you able to predocue it with the latest selinux-policy package? 

THanks,
Lukas.

Comment 5 Pablo Reyes 2018-02-27 23:40:48 UTC
Found active bugs with same issue.

https://bugzilla.redhat.com/show_bug.cgi?id=1545932

https://bugzilla.redhat.com/show_bug.cgi?id=1539180 (similar but also deals with resolv.conf)

Upgraded to selinux-policy-3.13.1-283.26.fc27.src.rpm but issue still manifests with NetworkManager and chronyd appering the most in the SETroubleshoot Alert List.

Comment 6 Pablo Reyes 2018-02-28 19:07:08 UTC
(In reply to Lukas Vrabec from comment #4)
> Are you able to predocue it with the latest selinux-policy package? 
> 
> THanks,
> Lukas.

Hello Lukas, what do you mean by 'predocue' I'm a relatively new user but I'm willing to help with anything I can to resolve issue.

Comment 7 abyss.7 2018-06-18 11:25:14 UTC
No, I can't reproduce the problem, thanks!

Comment 8 abyss.7 2018-06-18 11:25:49 UTC
No, I can't reproduce the problem, thanks!

Comment 9 Lukas Vrabec 2018-12-18 15:37:13 UTC
*** Bug 1647439 has been marked as a duplicate of this bug. ***

Comment 10 science 2019-02-14 11:47:21 UTC
Description of problem:
Connect to any host using expressvpn and it appears

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

Additional info:
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         4.20.6-200.fc29.x86_64
type:           libreport


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