Bug 1175068

Summary: SELinux is preventing /usr/sbin/hddtemp from using the 'sys_admin' capabilities.
Product: [Fedora] Fedora Reporter: Janne Kettunen <janne.kettunen>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dominick.grift, dwalsh, janne.kettunen, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:48d7f3b3256cb9f39af6d0beba3c0d33e592521077511d7d637ee273018b4a18
Fixed In Version: selinux-policy-3.13.1-105.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-30 23:54:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Janne Kettunen 2014-12-17 05:25:42 UTC
Description of problem:
SELinux is preventing /usr/sbin/hddtemp from using the 'sys_admin' capabilities.

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

If you believe that hddtemp should have the sys_admin capability 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 hddtemp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                staff_u:staff_r:staff_consolehelper_t:s0
Target Context                staff_u:staff_r:staff_consolehelper_t:s0
Target Objects                Unknown [ capability ]
Source                        hddtemp
Source Path                   /usr/sbin/hddtemp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           hddtemp-0.3-0.33.beta15.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-99.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.6-300.fc21.x86_64 #1 SMP Mon
                              Dec 8 22:29:32 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-12-17 07:17:39 EET
Last Seen                     2014-12-17 07:17:39 EET
Local ID                      564b5e38-fac3-4195-aa7d-157260d26e6f

Raw Audit Messages
type=AVC msg=audit(1418793459.688:298): avc:  denied  { sys_admin } for  pid=5407 comm="hddtemp" capability=21  scontext=staff_u:staff_r:staff_consolehelper_t:s0 tcontext=staff_u:staff_r:staff_consolehelper_t:s0 tclass=capability permissive=0


type=SYSCALL msg=audit(1418793459.688:298): arch=x86_64 syscall=ioctl success=no exit=EACCES a0=3 a1=31f a2=7fff2df3d480 a3=0 items=0 ppid=5406 pid=5407 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm=hddtemp exe=/usr/sbin/hddtemp subj=staff_u:staff_r:staff_consolehelper_t:s0 key=(null)

Hash: hddtemp,staff_consolehelper_t,staff_consolehelper_t,capability,sys_admin

Version-Release number of selected component:
selinux-policy-3.13.1-99.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.6-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-01-02 16:22:20 UTC
Staff_t should not be using usemod helper apps?  What were you trying to do?

Comment 2 Janne Kettunen 2015-01-05 05:46:47 UTC
Hi.

I can only guess its related to KSensors which I'm running in KDE Desktop.

This system is upgraded from fc20 originally and I have some my on custom policies made with audit2allow. Maybe I should try remove those fc20 custom policies and relabel filesystem and see what gives after that.

Comment 3 Daniel Walsh 2015-01-05 13:51:48 UTC
ebe618eea908ffc61a6f39459f3d40b079e00c7c allows this via transition in git.

Comment 4 Lukas Vrabec 2015-01-16 10:00:41 UTC
commit 2ef05e03976dcaadc1843fd3a3e7ccf02412aaab
Author: Dan Walsh <dwalsh>
Date:   Mon Jan 5 08:51:08 2015 -0500

    Allow domains that can use consolehelper to transition to hddtemp

Comment 5 Fedora Update System 2015-01-27 16:49:22 UTC
selinux-policy-3.13.1-105.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.fc21

Comment 6 Fedora Update System 2015-01-30 04:32:20 UTC
Package selinux-policy-3.13.1-105.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-105.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1337/selinux-policy-3.13.1-105.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-01-30 23:54:47 UTC
selinux-policy-3.13.1-105.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.