Bug 812023

Summary: SELinux is preventing sh from 'getattr' accesses on the file /usr/bin/systemctl.
Product: [Fedora] Fedora Reporter: Frank Murphy <frankly3d>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:baa9b8c47bc8f1cbdf3418363c8ab3e263ed58416ee1694221dd81e93c0e6e74
Fixed In Version: selinux-policy-3.10.0-114.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-18 22:51:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Frank Murphy 2012-04-12 14:50:50 UTC
libreport version: 2.0.10
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.1-5.fc17.i686
time:           Thu 12 Apr 2012 15:50:12 IST

:SELinux is preventing sh from 'getattr' accesses on the file /usr/bin/systemctl.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that sh should be allowed getattr access on the systemctl file 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 sh /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:freshclam_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:systemd_systemctl_exec_t:s0
:Target Objects                /usr/bin/systemctl [ file ]
:Source                        sh
:Source Path                   sh
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           systemd-44-4.fc17.i686
:Policy RPM                    selinux-policy-3.10.0-110.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.1-5.fc17.i686 #1
:                              SMP Tue Apr 10 21:29:02 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    Thu 12 Apr 2012 15:18:30 IST
:Last Seen                     Thu 12 Apr 2012 15:18:30 IST
:Local ID                      84e7be04-2b0d-45a0-bcbc-3018b99de2bd
:Raw Audit Messages
:type=AVC msg=audit(1334240310.915:98): avc:  denied  { getattr } for  pid=13444 comm="sh" path="/usr/bin/systemctl" dev="vda3" ino=20457 scontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_systemctl_exec_t:s0 tclass=file
:Hash: sh,freshclam_t,systemd_systemctl_exec_t,file,getattr
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied

Comment 1 Frank Murphy 2012-04-12 14:59:39 UTC
This is due to the following in /etc/freshclam.conf

 Send the RELOAD command to clamd.
# Default: no
NotifyClamd /etc/clamd.d/clamav.conf

# Run command after successful database update.
# Default: disabled
OnUpdateExecute systemctl reload clamd.clamav.service

both clamav booleans are allowed.

Comment 2 Fedora Update System 2012-04-13 08:41:43 UTC
selinux-policy-3.10.0-114.fc17 has been submitted as an update for Fedora 17.

Comment 3 Fedora Update System 2012-04-14 01:46:31 UTC
Package selinux-policy-3.10.0-114.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-114.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Frank Murphy 2012-04-14 08:10:24 UTC
Can this fix be ported to F18\Rawhide.

Comment 5 Miroslav Grepl 2012-04-16 08:16:01 UTC
This release has been pushed into updates-testing. This release should end up in Rawhide.

Comment 6 Fedora Update System 2012-04-18 22:51:16 UTC
selinux-policy-3.10.0-114.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.