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 1977261

Summary: AVC denial comm="mdadm" name="dma_heap" dev="devtmpfs"
Product: Red Hat Enterprise Linux 9 Reporter: Zdenek Veleba <zveleba>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: lvrabec, mmalik, plautrba, ssekidde
Target Milestone: betaKeywords: Triaged
Target Release: 9.0 BetaFlags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-29 11:03:44 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 Zdenek Veleba 2021-06-29 10:42:48 UTC
During our testing we found issue with the selinux policy:

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:      33
selinux-policy-34.1.8-1.el9.noarch
----
time->Tue Jun 29 09:29:24 2021
type=AVC msg=audit(1624973364.249:116): avc:  denied  { search } for  pid=668 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=102 scontext=system_u:system_r:mdadm_t:s0 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=0
----
time->Tue Jun 29 09:29:24 2021
type=AVC msg=audit(1624973364.249:117): avc:  denied  { getattr } for  pid=668 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=102 scontext=system_u:system_r:mdadm_t:s0 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=0
----
time->Tue Jun 29 09:29:25 2021
type=AVC msg=audit(1624973365.130:143): avc:  denied  { search } for  pid=744 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=102 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=0
----
time->Tue Jun 29 09:29:25 2021
type=AVC msg=audit(1624973365.148:144): avc:  denied  { getattr } for  pid=744 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=102 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=0

This happens when running system on RAID1

Installed using ks:
reqpart --add-boot
part swap --fstype="swap" --recommended --label=SWAP
part raid.01 --size=6144
part raid.02 --size=6144
raid / --device=0 --level=RAID1 raid.01 raid.02
bootloader --location=mbr --leavebootorder
clearpart --all --initlabel
keyboard us
lang en_US.UTF-8
rootpw anaconda
selinux --enforcing
timezone America/New_York
zerombr
network --bootproto dhcp
reboot
cmdline

With final storage setup:
NAME    MAJ:MIN RM SIZE RO TYPE  MOUNTPOINTS
vda     253:0    0  10G  0 disk  
|-vda1  253:1    0   1G  0 part  /boot
`-vda2  253:2    0   6G  0 part  
  `-md0   9:0    0   6G  0 raid1 /
vdb     253:16   0  10G  0 disk  
|-vdb1  253:17   0   6G  0 part  
| `-md0   9:0    0   6G  0 raid1 /
`-vdb2  253:18   0   4G  0 part  [SWAP]
vdc     253:32   0  10G  0 disk  
vdd     253:48   0  10G  0 disk  
vde     253:64   0  10G  0 disk  
vdf     253:80   0  10G  0 disk  

Found in version:
RHEL-9.0.0-20210616.0
selinux-policy-34.1.8-1.el9

Comment 2 Zdenek Pytela 2021-06-29 11:03:44 UTC
Please use the latest selinux-policy package version.

*** This bug has been marked as a duplicate of bug 1965411 ***

Comment 3 Zdenek Pytela 2021-06-29 11:18:37 UTC

*** This bug has been marked as a duplicate of bug 1966834 ***