Bug 1596072

Summary: SELinux is preventing /usr/sbin/load_policy from map access on the file /usr/sbin/load_policy
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Slebodnik <lslebodn>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-207.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:05:54 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 Lukas Slebodnik 2018-06-28 08:16:14 UTC
SELinux is preventing /usr/sbin/load_policy from map access on the file /usr/sbin/load_policy.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that load_policy should be allowed map access on the load_policy file 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 'load_policy' --raw | audit2allow -M my-loadpolicy
# semodule -i my-loadpolicy.pp


Additional Information:
Source Context                system_u:system_r:sssd_selinux_manager_t:s0
Target Context                system_u:object_r:load_policy_exec_t:s0
Target Objects                /usr/sbin/load_policy [ file ]
Source                        load_policy
Source Path                   /usr/sbin/load_policy
Port                          <Unknown>
Host                          ci21.testrelm.test
Source RPM Packages           policycoreutils-2.5-23.el7.x86_64
Target RPM Packages           policycoreutils-2.5-23.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-205.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     ci21.testrelm.test
Platform                      Linux ci21.testrelm.test 3.10.0-915.el7.x86_64 #1
                              SMP Fri Jun 22 23:49:29 UTC 2018 x86_64 x86_64
Alert Count                   12
First Seen                    2018-06-28 03:41:54 EDT
Last Seen                     2018-06-28 04:03:43 EDT
Local ID                      db213a6e-6d07-4a40-8834-3962bc98befe

Raw Audit Messages
type=AVC msg=audit(1530173023.913:3825): avc:  denied  { map } for  pid=59345 comm="load_policy" path="/usr/sbin/load_policy" dev="dm-0" ino=67761646 scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:object_r:load_policy_exec_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1530173023.913:3825): arch=x86_64 syscall=execve success=yes exit=0 a0=55c8ea89a9b0 a1=55c8eb81b900 a2=0 a3=7ffc83e0bc80 items=2 ppid=59333 pid=59345 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=load_policy exe=/usr/sbin/load_policy subj=system_u:system_r:load_policy_t:s0 key=(null)

type=CWD msg=audit(1530173023.913:3825): cwd=/

type=PATH msg=audit(1530173023.913:3825): item=0 name=/sbin/load_policy inode=67761646 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:load_policy_exec_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0

type=PATH msg=audit(1530173023.913:3825): item=1 name=/lib64/ld-linux-x86-64.so.2 inode=67254592 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0

Hash: load_policy,sssd_selinux_manager_t,load_policy_exec_t,file,map

Comment 2 Lukas Slebodnik 2018-06-28 08:17:32 UTC
There is the same avc in enforcing mode

time->Thu Jun 28 03:39:27 2018
type=PROCTITLE msg=audit(1530171567.650:851): proctitle="(null)"
type=PATH msg=audit(1530171567.650:851): item=1 name="/lib64/ld-linux-x86-64.so.2" inode=67254592 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=PATH msg=audit(1530171567.650:851): item=0 name="/sbin/load_policy" inode=67753198 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:load_policy_exec_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=CWD msg=audit(1530171567.650:851):  cwd="/"
type=SYSCALL msg=audit(1530171567.650:851): arch=c000003e syscall=59 success=no exit=-13 a0=559230799a30 a1=55923171a090 a2=0 a3=7ffd49f01360 items=2 ppid=32375 pid=32379 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="load_policy" exe="/usr/sbin/load_policy" subj=system_u:system_r:sssd_selinux_manager_t:s0 key=(null)
type=AVC msg=audit(1530171567.650:851): avc:  denied  { map } for  pid=32379 comm="load_policy" path="/usr/sbin/load_policy" dev="dm-0" ino=67753198 scontext=system_u:system_r:sssd_selinux_manager_t:s0 tcontext=system_u:object_r:load_policy_exec_t:s0 tclass=file permissive=0

Comment 6 errata-xmlrpc 2018-10-30 10:05:54 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, 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-2018:3111