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.
NetworkManager-dispatcher runs under the same context as NetworkManager;
# ls -lZ /usr/libexec/nm-dispatcher /usr/sbin/NetworkManager
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_exec_t:s0 58032 Aug 2 10:32 /usr/libexec/nm-dispatcher
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_exec_t:s0 3602712 Aug 2 10:32 /usr/sbin/NetworkManager
That seems highly undesirable to me.
NetworkManager-dispatcher executes user-provided scripts on behalf of the user (or the package which installed those scripts). It thus should have an entirely different security context than NetworkManager.
Also, all dispatcher scripts have the same context too:
# ll -Z /{etc,usr/lib}/NetworkManager/dispatcher.d
"/etc/NetworkManager/dispatcher.d":
total 4
-rw-r--r--. 1 root root unconfined_u:object_r:NetworkManager_initrc_exec_t:s0 0 Nov 28 2019 "30-winbind"
lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 69 Oct 8 2017 "90-vpn-routes.sh" -> "/data/src/portable_environment/scripts/nm-dispatcher/90-vpn-routes.sh"
lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 70 Oct 8 2017 "91-resolv-conf.sh" -> "/data/src/portable_environment/scripts/nm-dispatcher/91-resolv-conf.sh"
-rwxr-xr-x. 1 root root unconfined_u:object_r:NetworkManager_initrc_exec_t:s0 101 Dec 23 2019 "99-test.sh"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "no-wait.d"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-down.d"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-up.d"
"/usr/lib/NetworkManager/dispatcher.d":
total 20
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 104 Feb 19 09:38 "04-iscsi"
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 3844 Aug 2 10:32 "10-ifcfg-rh-routes.sh"
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 1066 May 27 11:25 "11-dhclient"
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 1416 May 13 17:13 "20-chrony-dhcp"
-rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 459 May 12 13:06 "20-chrony-onoffline"
lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 30 Aug 2 10:32 "90-nm-cloud-setup.sh" -> "no-wait.d/90-nm-cloud-setup.sh"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 63 Aug 2 12:31 "no-wait.d"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-down.d"
drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 35 Aug 2 12:31 "pre-up.d"
that is again not right. Only because one dispatcher script does something, it doesn't mean that all other dispatcher scripts should have the same permissions. Dispatcher scripts are commonly provided by other applications that react on events from NetworkManager. So their context is more dependent on that other application than on NetworkManager (or NetworkManager-dispatcher).
Hello, this el8 package seems to break the NetworkManager-ci tests, there are several "Permission denied" for dispatcher directory or script in journal log for "nm-dispatcher", previous version of selinux-policy works fine (also `setenforce 0` works fine), so it is really selinux-policy issue. I would move this back to ASSIGNED and set FailedQA until there is fixed package.
Comment 28Jean-Tsung Hsiao
2022-02-22 14:56:50 UTC
NOTE that we're using the fixed version:
selinux-policy-targeted-3.14.3-91.el8.noarch
*** selinux-policy-3.14.3-91.el8.noarch ***
libselinux-2.9-5.el8.x86_64
python3-libselinux-2.9-5.el8.x86_64
libselinux-utils-2.9-5.el8.x86_64
openvswitch-selinux-extra-policy-1.0-28.el8fdp.noarch
rpm-plugin-selinux-4.14.3-21.el8.x86_64
Please advise!
Thanks!
Jean
Confining nm-dispatcher plugins will not be included in Red Hat Enterprise Linux 8 as there would be a non-negligible risk of regression. We will now close this issue, but if you believe that the decision needs to be reconsidered, feel free to reopen this bug and attach information regarding severity of the bugzilla.
NetworkManager-dispatcher runs under the same context as NetworkManager; # ls -lZ /usr/libexec/nm-dispatcher /usr/sbin/NetworkManager -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_exec_t:s0 58032 Aug 2 10:32 /usr/libexec/nm-dispatcher -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_exec_t:s0 3602712 Aug 2 10:32 /usr/sbin/NetworkManager That seems highly undesirable to me. NetworkManager-dispatcher executes user-provided scripts on behalf of the user (or the package which installed those scripts). It thus should have an entirely different security context than NetworkManager. Also, all dispatcher scripts have the same context too: # ll -Z /{etc,usr/lib}/NetworkManager/dispatcher.d "/etc/NetworkManager/dispatcher.d": total 4 -rw-r--r--. 1 root root unconfined_u:object_r:NetworkManager_initrc_exec_t:s0 0 Nov 28 2019 "30-winbind" lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 69 Oct 8 2017 "90-vpn-routes.sh" -> "/data/src/portable_environment/scripts/nm-dispatcher/90-vpn-routes.sh" lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 70 Oct 8 2017 "91-resolv-conf.sh" -> "/data/src/portable_environment/scripts/nm-dispatcher/91-resolv-conf.sh" -rwxr-xr-x. 1 root root unconfined_u:object_r:NetworkManager_initrc_exec_t:s0 101 Dec 23 2019 "99-test.sh" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "no-wait.d" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-down.d" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-up.d" "/usr/lib/NetworkManager/dispatcher.d": total 20 -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 104 Feb 19 09:38 "04-iscsi" -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 3844 Aug 2 10:32 "10-ifcfg-rh-routes.sh" -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 1066 May 27 11:25 "11-dhclient" -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 1416 May 13 17:13 "20-chrony-dhcp" -rwxr-xr-x. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 459 May 12 13:06 "20-chrony-onoffline" lrwxrwxrwx. 1 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 30 Aug 2 10:32 "90-nm-cloud-setup.sh" -> "no-wait.d/90-nm-cloud-setup.sh" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 63 Aug 2 12:31 "no-wait.d" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 6 Aug 2 10:32 "pre-down.d" drwxr-xr-x. 2 root root system_u:object_r:NetworkManager_initrc_exec_t:s0 35 Aug 2 12:31 "pre-up.d" that is again not right. Only because one dispatcher script does something, it doesn't mean that all other dispatcher scripts should have the same permissions. Dispatcher scripts are commonly provided by other applications that react on events from NetworkManager. So their context is more dependent on that other application than on NetworkManager (or NetworkManager-dispatcher).