Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1391738

Summary: NetworkManager related selinux 'denied' messages are logged for dhclient
Product: Red Hat Enterprise Linux 7 Reporter: Bob Fournier <bfournie>
Component: NetworkManagerAssignee: sushil kulkarni <sukulkar>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 01:18:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
audit log from controller none

Description Bob Fournier 2016-11-03 21:56:15 UTC
Created attachment 1217159 [details]
audit log from controller

Description of problem:

In Openstack OSP-10 controller nodes the following audit log messages are seen:

audit/audit.log:type=AVC msg=audit(1478094040.740:27): avc:  denied  { read } for  pid=1145 comm="NetworkManager" name="dhclient-enp3s0f1.pid" dev="tmpfs" ino=346 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file
audit/audit.log:type=AVC msg=audit(1478094040.748:28): avc:  denied  { read } for  pid=1145 comm="NetworkManager" name="dhclient-enp3s0f0.pid" dev="tmpfs" ino=18727 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file
audit/audit.log:type=AVC msg=audit(1478094083.924:102): avc:  denied  { unlink } for  pid=1145 comm="NetworkManager" name="dhclient-enp3s0f1.pid" dev="tmpfs" ino=346 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file
audit/audit.log:type=AVC msg=audit(1478094084.081:103): avc:  denied  { unlink } for  pid=1145 comm="NetworkManager" name="dhclient-enp3s0f0.pid" dev="tmpfs" ino=18727 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file

This is for the dhclients started by NetworManager:
messages:Nov  2 09:40:40 host-172-16-1-24 NetworkManager[1145]: <info>  [1478094040.7435] dhcp4 (enp3s0f1): dhclient started with pid 1174
messages:Nov  2 09:40:40 host-172-16-1-24 NetworkManager[1145]: <info>  [1478094040.7501] dhcp4 (enp3s0f0): dhclient started with pid 1178

Not sure if the way that dhclient is created is causing it to not be recognized by selinux.

Version-Release number of selected component (if applicable):
version 1.4.0-12.el7

NetworkManager[1145]: <info>  [1478094040.6056] NetworkManager (version 1.4.0-12.el7) is starting

How reproducible:

Appears to happen every time.

Steps to Reproduce:
1. Deploy an Openstack overcloud controller node.

Actual results:

Selinux 'denied' messages in audit log.

audit/audit.log:type=AVC msg=audit(1478094040.740:27): avc:  denied  { read } for  pid=1145 comm="NetworkManager" name="dhclient-enp3s0f1.pid" dev="tmpfs" ino=346 scontext=system_u:system_r:NetworkManager_t:s0 
Expected results:

No Selinux 'denied' log messages.

Additional info:

Audit log is attached.

Comment 1 Bob Fournier 2016-11-04 01:18:22 UTC
I don't think this is a NetworkManager problem.  It appears the selinunx messages regarding the pid files are occurring because another instance of dhclient is run prior to NetworkManager starting the dhclient instances.  The pid files therefore cannot be accessed by NetworkManager.

We may need to disable dhclients from being started by NetworkManager but it does not appear to be a bug.