Bug 1814644 - SELinux is preventing /usr/libexec/platform-python3.6 from map access on the file /etc/passwd.
Summary: SELinux is preventing /usr/libexec/platform-python3.6 from map access on the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.3
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-18 12:37 UTC by Chandan Chouhan
Modified: 2020-11-04 01:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:56:06 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4528 0 None None None 2020-11-04 01:56:32 UTC

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\*
python3-subscription-manager-rhsm-1.25.17-1.el8.x86_64
subscription-manager-rhsm-certificates-1.25.17-1.el8.x86_64
rhsm-gtk-1.25.17-1.el8.x86_64
librhsm-0.0.3-3.el8.x86_64

# rpm -qa | grep -i selinux*
rpm-plugin-selinux-4.14.2-25.el8.x86_64
libselinux-utils-2.9-2.1.el8.x86_64
libselinux-2.9-2.1.el8.x86_64
python3-libselinux-2.9-2.1.el8.x86_64
selinux-policy-3.14.3-20.el8.noarch
pcp-selinux-4.3.2-2.el8.x86_64
selinux-policy-targeted-3.14.3-20.el8.noarch


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.

Do
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.

https://access.redhat.com/errata/RHBA-2020:4528


Note You need to log in before you can comment on or make changes to this bug.