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 1820264

Summary: [RHEL8.2] SELinux prevents the /usr/lib/opa-fm/runtime/sm process from creating an RDMA socket
Product: Red Hat Enterprise Linux 8 Reporter: Brian Chae <bchae>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: lvrabec, mmalik, plautrba, ssekidde
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
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: 2020-04-02 15:56:26 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:

Description Brian Chae 2020-04-02 15:48:28 UTC
Description of problem:


Version-Release number of selected component (if applicable):

DISTRO=RHEL-8.2.0-20200331.0
DISTRO=RHEL-8.2.0-20200331.0
+ [20-04-01 04:34:01] cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
+ [20-04-01 04:34:01] uname -a
Linux rdma-qe-14.lab.bos.redhat.com 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
+ [20-04-01 04:34:01] cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-193.el8.x86_64 root=UUID=0684130b-fe76-43e6-810f-70bb054c3264 ro intel_idle.max_cstate=0 processor.max_cstate=0 console=tty0 rd_NO_PLYMOUTH crashkernel=auto resume=UUID=61b6623a-b15c-47f2-b21f-79e2ceabd698 console=ttyS0,115200n81
+ [20-04-01 04:34:01] rpm -q rdma-core linux-firmware
rdma-core-26.0-8.el8.x86_64
linux-firmware-20191202-97.gite8a0f4c9.el8.noarch

selinux-policy-3.14.3-41.el8.noarch

How reproducible:


Steps to Reproduce:
1.boot RDMA server and client hosts with OFA HFI HCAs

+ [20-04-01 04:34:01] ibstat
CA 'hfi1_0'
	CA type: 
	Number of ports: 1
	Firmware version: 1.27.0
	Hardware version: 10
	Node GUID: 0x00117501016710f0
	System image GUID: 0x00117501016710f0
	Port 1:
		State: Active
		Physical state: LinkUp
		Rate: 100
		Base lid: 4
		LMC: 0
		SM lid: 3
		Capability mask: 0x00490020
		Port GUID: 0x00117501016710f0
		Link layer: InfiniBand

2.Configure the hfi1_opa0 interfaces with IP addresses on both hosts

6: hfi1_opa0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UP group default qlen 256
    link/infiniband 80:00:00:02:fe:80:00:00:00:00:00:00:00:11:75:01:01:67:10:f0 brd 00:ff:ff:ff:ff:12:40:1b:80:01:00:00:00:00:00:00:ff:ff:ff:ff
    inet 172.31.20.14/24 brd 172.31.20.255 scope global dynamic noprefixroute hfi1_opa0
       valid_lft 3344sec preferred_lft 3344sec
    inet6 fe80::211:7501:167:10f0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


6: hfi1_opa0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UP group default qlen 256
    link/infiniband 80:00:00:02:fe:80:00:00:00:00:00:00:00:11:75:01:01:67:0f:b0 brd 00:ff:ff:ff:ff:12:40:1b:80:01:00:00:00:00:00:00:ff:ff:ff:ff
    inet 172.31.20.15/24 brd 172.31.20.255 scope global dynamic noprefixroute hfi1_opa0
       valid_lft 3480sec preferred_lft 3480sec
    inet6 fe80::211:7501:167:fb0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

3. timeout 3m ping -i 0.2 -c 100 172.31.20.15

Actual results:

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      31
selinux-policy-3.14.3-41.el8.noarch
----
time->Wed Apr  1 04:34:30 2020
type=AVC msg=audit(1585730070.211:384): avc:  denied  { create } for  pid=50746 comm="sm" scontext=system_u:system_r:opafm_t:s0 tcontext=system_u:system_r:opafm_t:s0 tclass=netlink_rdma_socket permissive=0


Expected results:

No avc: denied message 

Additional info:

Please, refer to beaker job output of J:4169377 [ https://beaker.engineering.redhat.com/jobs/4169377 ] on both Recipes 

https://beaker.engineering.redhat.com/recipes/8083495#task108373796
https://beaker.engineering.redhat.com/recipes/8083496#task108373798,task108373799