Bug 744317

Summary: SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from using the 'sys_nice' capabilities.
Product: [Fedora] Fedora Reporter: Daniel Ferreira Castro <dfcastro>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, eparis, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:d0ff5d7e984392bd577e08eba645e87d64b6a0815ca3bec60694bccc99eab3de
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-23 14:47:01 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 Daniel Ferreira Castro 2011-10-07 20:17:02 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-0.rc8.git0.1.fc16.x86_64
reason:         SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from using the 'sys_nice' capabilities.
time:           Fri Oct  7 17:16:28 2011

description:
:SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from using the 'sys_nice' capabilities.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that plugin-container should have the sys_nice 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 plugin-containe /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
:                              0.c1023
:Target Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
:                              0.c1023
:Target Objects                Unknown [ capability ]
:Source                        plugin-containe
:Source Path                   /usr/lib64/xulrunner-2/plugin-container
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           xulrunner-7.0.1-1.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-36.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.1.0-0.rc8.git0.1.fc16.x86_64 #1 SMP Tue Oct 4
:                              03:16:40 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Fri 07 Oct 2011 10:56:17 AM BRT
:Last Seen                     Fri 07 Oct 2011 10:56:17 AM BRT
:Local ID                      12e2bca4-d0a7-44ed-a451-4245460f1773
:
:Raw Audit Messages
:type=AVC msg=audit(1317995777.790:604): avc:  denied  { sys_nice } for  pid=10976 comm="plugin-containe" capability=23  scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tclass=capability
:
:
:type=SYSCALL msg=audit(1317995777.790:604): arch=x86_64 syscall=sched_setscheduler success=yes exit=0 a0=2ae0 a1=0 a2=7fff443ec370 a3=7fff443ec0d0 items=0 ppid=10878 pid=10976 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=plugin-containe exe=/usr/lib64/xulrunner-2/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)
:
:Hash: plugin-containe,mozilla_plugin_t,mozilla_plugin_t,capability,sys_nice
:
:audit2allow
:
:#============= mozilla_plugin_t ==============
:allow mozilla_plugin_t self:capability sys_nice;
:
:audit2allow -R
:
:#============= mozilla_plugin_t ==============
:allow mozilla_plugin_t self:capability sys_nice;
:

Comment 1 Miroslav Grepl 2011-10-10 10:42:50 UTC
Daniel, 
do you know what you were doing when this happened (and also AVC msgs which you reported)?

Comment 2 Daniel Walsh 2011-10-11 17:29:17 UTC
/* Allow raising priority and setting priority on other (different
   UID) processes */
/* Allow use of FIFO and round-robin (realtime) scheduling on own
   processes and setting the scheduling algorithm used by another
   process. */
/* Allow setting cpu affinity on other processes */

Must be a plugin trying to do one of these ^^

Comment 3 Eric Paris 2011-10-11 17:48:46 UTC
It is the first one.  The call was:

sched_setscheduler(10976, 0, 7fff443ec370)

10976 was this process pid.
0 == SCHED_NORMAL
We don't know what the sched_param structure at that address had for the sched_priority.

This process must have attempted to up its priority.  This does not seem like something we want to allow.

Comment 4 Daniel Walsh 2011-11-23 14:47:01 UTC
Dontaudited in the current release.