Bug 1250882

Summary: Selinux denial after log in.
Product: Red Hat Enterprise Linux 7 Reporter: Robin Hack <rhack>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, rhack, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-07 10:13:43 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:
Attachments:
Description Flags
Full audit log none

Description Robin Hack 2015-08-06 08:39:49 UTC
Description of problem:
I just installed rhel7.2 developer workstation, log in and this happen
after some time.


Version-Release number of selected component (if applicable):


How reproducible:
I don't know.

Steps to Reproduce:
1. Log in and leave desktop running

Actual results:
SELinux is preventing /usr/bin/python2.7 from write access on the directory /sys/fs/fuse/connections.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/sys/fs/fuse/connections default label should be sysfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /sys/fs/fuse/connections

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that python2.7 should be allowed write access on the connections directory 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:
# grep rhsmd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:fusefs_t:s0
Target Objects                /sys/fs/fuse/connections [ dir ]
Source                        rhsmd
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          unused-4-169.brq.redhat.com
Source RPM Packages           python-2.7.5-30.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-37.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     unused-4-169.brq.redhat.com
Platform                      Linux unused-4-169.brq.redhat.com
                              3.10.0-302.el7.x86_64 #1 SMP Fri Jul 31 18:34:51
                              EDT 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-08-06 10:32:01 CEST
Last Seen                     2015-08-06 10:32:02 CEST
Local ID                      1f3dd2b0-521d-411c-83a5-4137e7733304

Raw Audit Messages
type=AVC msg=audit(1438849922.217:487): avc:  denied  { write } for  pid=4283 comm="rhsmd" name="/" dev="fusectl" ino=1 scontext=system_u:system_r:rhsmcertd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fusefs_t:s0 tclass=dir


type=SYSCALL msg=audit(1438849922.217:487): arch=x86_64 syscall=access success=no exit=EACCES a0=7ffd35219368 a1=2 a2=0 a3=0 items=0 ppid=1 pid=4283 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmd exe=/usr/bin/python2.7 subj=system_u:system_r:rhsmcertd_t:s0-s0:c0.c1023 key=(null)

Hash: rhsmd,rhsmcertd_t,fusefs_t,dir,write


Expected results:


Additional info:

Comment 1 Robin Hack 2015-08-06 08:43:41 UTC
Created attachment 1059798 [details]
Full audit log

Full audit log

Comment 2 Milos Malik 2015-08-06 08:51:35 UTC
I believe this bug is a duplicate of BZ#1249904.

Comment 3 Milos Malik 2015-08-06 08:56:27 UTC
Could you find out what FUSE filesystem is mounted on that machine?

# mount

Comment 5 Robin Hack 2015-08-06 09:23:29 UTC
Hi Milos. I belive I can :).

[root@unused-4-169 /]# mount | grep fuse
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse 
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

Comment 7 Miroslav Grepl 2015-08-07 10:13:43 UTC

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