Bug 836755 - SELinux is preventing /usr/sbin/sysctl from using the 'sys_admin' capabilities.
SELinux is preventing /usr/sbin/sysctl from using the 'sys_admin' capabilities.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:3a9d2b3e0970a509487be99d0f4...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-30 19:13 EDT by Daniel Rindt
Modified: 2012-07-21 18:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-21 18:51:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Rindt 2012-06-30 19:13:23 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.4-3.fc17.x86_64
time:           So 01 Jul 2012 01:13:06 CEST

description:
:SELinux is preventing /usr/sbin/sysctl from using the 'sys_admin' capabilities.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If sie denken, dass sysctl standardmäßig sys_admin Berechtigung haben sollten.
:Then sie sollten dies als Fehler melden.
:Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
:Do
:zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
:# grep sysctl /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:tuned_t:s0
:Target Context                system_u:system_r:tuned_t:s0
:Target Objects                 [ capability ]
:Source                        sysctl
:Source Path                   /usr/sbin/sysctl
:Port                          <Unbekannt>
:Host                          (removed)
:Source RPM Packages           procps-3.2.8-26.20110302git.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-134.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.3-1.fc17.x86_64 #1
:                              SMP Mon Jun 18 19:53:17 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    Sa 30 Jun 2012 00:52:52 CEST
:Last Seen                     So 01 Jul 2012 01:10:50 CEST
:Local ID                      0a262508-dfea-4ef6-8a97-ff30b42ee426
:
:Raw Audit Messages
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_admin } for  pid=19787 comm="sysctl" capability=21  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_nice } for  pid=19787 comm="sysctl" capability=23  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_admin } for  pid=19787 comm="sysctl" capability=21  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_nice } for  pid=19787 comm="sysctl" capability=23  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_admin } for  pid=19787 comm="sysctl" capability=21  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_nice } for  pid=19787 comm="sysctl" capability=23  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_admin } for  pid=19787 comm="sysctl" capability=21  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=AVC msg=audit(1341097850.668:295): avc:  denied  { sys_nice } for  pid=19787 comm="sysctl" capability=23  scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability
:
:
:type=SYSCALL msg=audit(1341097850.668:295): arch=x86_64 syscall=write success=yes exit=ENOENT a0=5 a1=7fe79f255000 a2=2 a3=402060 items=0 ppid=690 pid=19787 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sysctl exe=/usr/sbin/sysctl subj=system_u:system_r:tuned_t:s0 key=(null)
:
:Hash: sysctl,tuned_t,tuned_t,capability,sys_admin
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-07-01 17:23:26 EDT
What did you setup in the tuned to get these AVC msgs?
Comment 2 Daniel Rindt 2012-07-06 08:13:01 EDT
[root@localhost ~]# cat /usr/lib/tuned/powersave/tuned.conf
#
# tuned configuration
#

[cpu]

[eeepc_she]

[disk]
# Comma separated list of devices, all devices if commented out.
devices=sda,sdb,sdc

[net]
# Comma separated list of devices, all devices if commented out.
devices=p3p1,wlan0

[sysctl]
vm.laptop_mode=5
vm.dirty_writeback_centisecs=1500
kernel.nmi_watchdog=0

[script]
script=script.sh
Comment 3 Daniel Walsh 2012-07-10 21:25:27 EDT
I think we should add these privs.
Comment 4 Daniel Rindt 2012-07-11 00:39:21 EDT
Is this fixed already? The question results because i didn't get the sealert anymore.
Comment 5 Miroslav Grepl 2012-07-11 05:06:33 EDT
Fixed in selinux-policy-3.10.0-138.fc17
Comment 6 Fedora Update System 2012-07-18 09:04:08 EDT
selinux-policy-3.10.0-140.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-140.fc17
Comment 7 Fedora Update System 2012-07-19 05:10:59 EDT
Package selinux-policy-3.10.0-140.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-140.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10840/selinux-policy-3.10.0-140.fc17
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-07-21 18:51:17 EDT
selinux-policy-3.10.0-140.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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