Bug 2311085

Summary: SELinux is preventing check from 'mmap_zero' accesses on the memprotect labeled spc_t.
Product: [Fedora] Fedora Reporter: strasharo2000
Component: container-selinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: amurdaca, dwalsh, dweomer5, jchaloup, lsm5, pehunt, strasharo2000
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5c7c89f548c9328cf9181267c1073a7d27c6ebc95947df2a2ccbec5ec6bdce76;VARIANT_ID=matecompiz;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-09-10 10:22:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: description none

Description strasharo2000 2024-09-10 10:17:25 UTC
Description of problem:
I have docker installed, but it's not running any containers
SELinux is preventing check from 'mmap_zero' accesses on the memprotect labeled spc_t.

*****  Plugin mmap_zero (53.1 confidence) suggests   *************************

If you do not think check should need to mmap low memory in the kernel.
Then you may be under attack by a hacker, this is a very dangerous access.
Do
contact your security administrator and report this issue.

*****  Plugin catchall_boolean (42.6 confidence) suggests   ******************

If you want to allow mmap to low allowed
Then you must tell SELinux about this by enabling the 'mmap_low_allowed' boolean.

Do
setsebool -P mmap_low_allowed 1

*****  Plugin catchall (5.76 confidence) suggests   **************************

If you believe that check should be allowed mmap_zero access on memprotect labeled spc_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'check' --raw | audit2allow -M my-check
# semodule -X 300 -i my-check.pp

Additional Information:
Source Context                system_u:system_r:spc_t:s0
Target Context                system_u:system_r:spc_t:s0
Target Objects                Unknown [ memprotect ]
Source                        check
Source Path                   check
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.27-1.fc40.noarch
Local Policy RPM              container-selinux-2.232.1-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.10.7-200.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Aug 30 00:08:59 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-09-10 13:11:50 EEST
Last Seen                     2024-09-10 13:11:50 EEST
Local ID                      270f0c2f-aad7-4cf1-b52d-00156fd15f81

Raw Audit Messages
type=AVC msg=audit(1725963110.954:1351): avc:  denied  { mmap_zero } for  pid=117330 comm="check" scontext=system_u:system_r:spc_t:s0 tcontext=system_u:system_r:spc_t:s0 tclass=memprotect permissive=0


Hash: check,spc_t,spc_t,memprotect,mmap_zero

Version-Release number of selected component:
selinux-policy-targeted-40.27-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
comment:        I have docker installed, but it's not running any containers
hashmarkername: setroubleshoot
kernel:         6.10.7-200.fc40.x86_64
component:      container-selinux
type:           libreport
reason:         SELinux is preventing check from 'mmap_zero' accesses on the memprotect labeled spc_t.
package:        selinux-policy-targeted-40.27-1.fc40.noarch
component:      container-selinux



Potential duplicate: bug 2169154

Comment 1 strasharo2000 2024-09-10 10:17:27 UTC
Created attachment 2046095 [details]
File: os_info

Comment 2 strasharo2000 2024-09-10 10:17:28 UTC
Created attachment 2046096 [details]
File: description

Comment 3 strasharo2000 2024-09-10 10:22:49 UTC

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