Red Hat Bugzilla – Bug 1464484
RFE: backport SELinux/InfiniBand policy
Last modified: 2018-04-10 08:33:50 EDT
Description of problem: Backport the SELinux policy to enable the InfiniBand access controls. See BZ #1449326 for the RHEL-7.x customer request. Additional info: Additional patches may also be necessary, but at a minimum the backport should include the upstream commit below: commit 25a5b2427447eb14edb07ce302217d37528813bc Author: Daniel Jurgens <danielj@mellanox.com> Date: Wed May 24 17:14:59 2017 +0300 refpolicy: Infiniband pkeys and endports Every Infiniband network will have a default pkey, so that is labeled. The rest of the pkey configuration is network specific. The policy allows access to the default and unlabeled pkeys for sysadm and staff users. kernel_t is allowed access to all pkeys, which it needs to process and route management datagrams. Endports are all unlabeled by default, sysadm users are allowed to manage the subnet on unlabeled endports. kernel_t is allowed to manage the subnet on all ibendports, which is required for configuring the HCA. This patch requires selinux series: "SELinux user space support for Infiniband RDMA", due to the new ipkeycon labeling mechanism. Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Lukas, just a quick mention that I had to add the following policy rules to the selinux-testsuite policy (see https://bugzilla.redhat.com/show_bug.cgi?id=1464478#c9), is there something that should be added in the RHEL-7.x base policy? --- a/policy/test_ibpkey.te +++ b/policy/test_ibpkey.te @@ -28,3 +28,8 @@ corenet_ib_access_unlabeled_pkeys(test_ibpkey_access_t) # Allow all of these domains to be entered from the sysadm domain. miscfiles_domain_entry_test_files(ibpkeydomain) userdom_sysadm_entry_spec_domtrans_to(ibpkeydomain) + +# XXX - need for test to pass +allow test_ibpkey_access_t proc_net_t:file { open read getattr }; +allow test_ibpkey_access_t self:capability { ipc_lock }; +
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0763