Bug 1814644

Summary: SELinux is preventing /usr/libexec/platform-python3.6 from map access on the file /etc/passwd.
Product: Red Hat Enterprise Linux 8 Reporter: Chandan Chouhan <cchouhan>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: lvrabec, mmalik, plautrba, ssekidde
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: 8.3   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:56:06 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:

Description Chandan Chouhan 2020-03-18 12:37:37 UTC
Description of problem:
SELinux is preventing /usr/libexec/platform-python3.6 from map access on the file /etc/passwd.

Version-Release number of selected component (if applicable):
- rhel-8.1 with below versions:

#  rpm -qa | grep -i rhsm\*

# rpm -qa | grep -i selinux*

How reproducible:
- As for a reproducer - Cu is installing RHEL 8.1 through Red Hat Satellite Server. And those SELinux alerts appear on every system boot:

Actual results:
- Selinux messages appear on every system boot.

Expected results:
- Selinux messages should not be there.

Enabling boolean "domain_can_mmap_files" solves this issue. By default the boolean is disabled, Cu expecting it to be enabled by default.

Additional info:

Cu getting below denials:


Raw Audit Messages
type=AVC msg=audit(1583404956.979:1509): avc:  denied  { map } for  pid=10068 comm="rhsmd" path="/etc/passwd" dev="nvme0n1p3" ino=24440 scontext=system_u:system_r:rhsmcertd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0

Raw Audit Messages
type=AVC msg=audit(1583406321.69:1524): avc:  denied  { map } for  pid=11486 comm="virt-what" path="/etc/passwd" dev="nvme0n1p3" ino=24440 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0

As per sealert, enabling boolean "domain_can_mmap_files" solves this issue:

SELinux is preventing /usr/libexec/platform-python3.6 from map access on the file /etc/passwd.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow domain to can mmap files
Then you must tell SELinux about this by enabling the 'domain_can_mmap_files' boolean.

setsebool -P domain_can_mmap_files 1

Comment 14 errata-xmlrpc 2020-11-04 01:56:06 UTC
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 (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.