Bug 1249904 - SELinux is preventing /usr/bin/python2.7 from write access on the directory /sys/fs/fuse/connections
SELinux is preventing /usr/bin/python2.7 from write access on the directory /...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
All Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Lukas Vrabec
BaseOS QE Security Team
: 1250882 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2015-08-04 02:26 EDT by Petr Sklenar
Modified: 2016-03-31 02:31 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-31 02:31:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Sklenar 2015-08-04 02:26:08 EDT
Description of problem:
SELinux is preventing /usr/bin/python2.7 from write access on the directory /sys/fs/fuse/connections

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

How reproducible:
there is alert each 10 minutes

Steps to Reproduce:
1. install fresh rhel7 with desktop , log in and wait for 10 minutes

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.
# /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.
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                          masox.brq.redhat.com
Source RPM Packages           python-2.7.5-30.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-34.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     masox.brq.redhat.com
Platform                      Linux masox.brq.redhat.com 3.10.0-300.el7.x86_64
                              #1 SMP Sat Jul 25 00:35:09 EDT 2015 x86_64 x86_64
Alert Count                   9
First Seen                    2015-08-03 13:56:47 CEST
Last Seen                     2015-08-04 08:22:55 CEST
Local ID                      cff4fbae-2d05-4816-b98b-7ce4e7fa51c2

Raw Audit Messages
type=AVC msg=audit(1438669375.964:975): avc:  denied  { write } for  pid=15444 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(1438669375.964:975): arch=x86_64 syscall=access success=no exit=EACCES a0=7ffd48700ce8 a1=2 a2=0 a3=0 items=0 ppid=1 pid=15444 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 2 Milos Malik 2015-08-04 05:06:34 EDT
Could you find out what's FUSE filesystem is mounted on that machine?

# mount
Comment 3 Miroslav Grepl 2015-08-07 06:13:43 EDT
*** Bug 1250882 has been marked as a duplicate of this bug. ***

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