Bug 1971517

Summary: avc: denied { search } for pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
Product: [Fedora] Fedora Reporter: Bruno Goncalves <bgoncalv>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-18 18:04:41 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 Bruno Goncalves 2021-06-14 09:02:43 UTC
Description of problem:
during CKI "swraid/trim" test [1] we hit the following issue:

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33
selinux-policy-34.11-1.fc34.noarch
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.401:916): avc:  denied  { search } for  pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:917): avc:  denied  { getattr } for  pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:918): avc:  denied  { read } for  pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:919): avc:  denied  { open } for  pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1

Version-Release number of selected component (if applicable):
selinux-policy-34.11-1.fc34.noarch

How reproducible:
It seems to be 100% reproducible

Steps to Reproduce:
1.1.Run the test [1] and check for avc denials


[1] https://gitlab.com/cki-project/kernel-tests/-/tree/main/storage/swraid/trim

Comment 1 Bruno Goncalves 2021-06-14 09:03:13 UTC
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33
selinux-policy-34.11-1.fc34.noarch
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.401:916): avc:  denied  { search } for  pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:917): avc:  denied  { getattr } for  pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:918): avc:  denied  { read } for  pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:12:23 2021
type=AVC msg=audit(1623445943.411:919): avc:  denied  { open } for  pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:13:41 2021
type=AVC msg=audit(1623446021.201:923): avc:  denied  { search } for  pid=864140 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:13:41 2021
type=AVC msg=audit(1623446021.201:924): avc:  denied  { getattr } for  pid=864140 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:13:41 2021
type=AVC msg=audit(1623446021.201:925): avc:  denied  { read } for  pid=864140 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
----
time->Fri Jun 11 17:13:41 2021
type=AVC msg=audit(1623446021.201:926): avc:  denied  { open } for  pid=864140 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1

Comment 3 Zdenek Pytela 2021-06-18 18:04:41 UTC

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