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 1480910 - SELinux is preventing dhclient from 'map' accesses on the file /var/lib/NetworkManager/dhclient-ens3.conf.
Summary: SELinux is preventing dhclient from 'map' accesses on the file /var/lib/Netwo...
Keywords:
Status: CLOSED ERRATA
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:d8ece69370e36d241f57baa27d9...
Depends On:
Blocks: 1481454
TreeView+ depends on / blocked
 
Reported: 2017-08-12 20:49 UTC by Joachim Frieben
Modified: 2017-08-20 14:17 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-271.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-20 14:17:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joachim Frieben 2017-08-12 20:49:24 UTC
Description of problem:
SELinux is preventing dhclient from 'map' accesses on the file /var/lib/NetworkManager/dhclient-ens3.conf.

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

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

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                system_u:object_r:NetworkManager_var_lib_t:s0
Target Objects                /var/lib/NetworkManager/dhclient-ens3.conf [ file
                              ]
Source                        dhclient
Source Path                   dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-270.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.13.0-0.rc4.git4.1.fc27.x86_64 #1
                              SMP Fri Aug 11 15:03:46 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-08-12 22:44:46 CEST
Last Seen                     2017-08-12 22:46:58 CEST
Local ID                      90467ac9-2a0d-4415-8b0b-b5b6035d17de

Raw Audit Messages
type=AVC msg=audit(1502570818.957:403): avc:  denied  { map } for  pid=2513 comm="dhclient" path="/var/lib/NetworkManager/dhclient-ens3.conf" dev="dm-0" ino=269730 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:NetworkManager_var_lib_t:s0 tclass=file permissive=1


Hash: dhclient,dhcpc_t,NetworkManager_var_lib_t,file,map

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.0-0.rc4.git4.1.fc27.x86_64
type:           libreport

Comment 1 Adam Williamson 2017-08-15 05:05:40 UTC
Description of problem:
Happened in normal system use after the 'map' permission was added. There will likely be dupes of this with different file names, as the file is named for the network interface ('br1' in this case).

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

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.0-0.rc4.git4.1.fc27.x86_64
type:           libreport

Comment 2 Jan Kurik 2017-08-15 08:46:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 3 Lukas Vrabec 2017-08-15 13:12:40 UTC
commit 7eef67f6b89825ef29042aff8c432751153b685f (HEAD -> rawhide)
Author: Stephen Smalley <sds.gov>
Date:   Wed May 24 15:41:22 2017 -0400

    contrib: allow map permission where needed
    
    Allow map permission where needed, based on limited testing.
    Introduced in the kernel in commit 6941857e82ae ("selinux: add a map
    permission check for mmap").  Depends on "refpolicy: Define and
    allow map permission" to define the permission.
    
    Signed-off-by: Stephen Smalley <sds.gov>

Fixes issue. Moving to post.


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