Bug 1135088 - SELinux is preventing usbmuxd from using the 'sys_resource' capabilities.
Summary: SELinux is preventing usbmuxd from using the 'sys_resource' capabilities.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f11a8e9fb8de2b2280aafaa4dfb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-28 19:45 UTC by Mathieu Bridon
Modified: 2014-09-10 02:45 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.13.1-78.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-10 02:45:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mathieu Bridon 2014-08-28 19:45:46 UTC
Description of problem:
SELinux is preventing usbmuxd from using the 'sys_resource' capabilities.

*****  Plugin sys_resource (91.4 confidence) suggests   **********************

If you do not want processes to require capabilities to use up all the system resources on your system;
Then you need to diagnose why your system is running out of system resources and fix the problem.  

According to /usr/include/linux/capability.h, sys_resource is required to:

/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */
/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */
/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
   resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
   you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */

Do
fix the cause of the SYS_RESOURCE on your system.

*****  Plugin catchall (9.59 confidence) suggests   **************************

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

Additional Information:
Source Context                system_u:system_r:usbmuxd_t:s0
Target Context                system_u:system_r:usbmuxd_t:s0
Target Objects                Unknown [ capability ]
Source                        usbmuxd
Source Path                   usbmuxd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-76.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.1-300.fc21.x86_64 #1 SMP Thu
                              Aug 14 15:06:34 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-08-28 21:32:17 CEST
Last Seen                     2014-08-28 21:32:17 CEST
Local ID                      4e9703bd-a617-4867-9753-ae2c3c236944

Raw Audit Messages
type=AVC msg=audit(1409254337.319:775): avc:  denied  { sys_resource } for  pid=23748 comm="usbmuxd" capability=24  scontext=system_u:system_r:usbmuxd_t:s0 tcontext=system_u:system_r:usbmuxd_t:s0 tclass=capability permissive=0


Hash: usbmuxd,usbmuxd_t,usbmuxd_t,capability,sys_resource

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

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.1-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-08-29 11:07:49 UTC
3a052f6386734c686fb2bef3831d52369471975c adds dontaudit for this in git.

Comment 2 Miroslav Grepl 2014-09-01 14:08:25 UTC
commit 3a052f6386734c686fb2bef3831d52369471975c
Author: Dan Walsh <dwalsh>
Date:   Fri Aug 29 07:06:15 2014 -0400

    Fixes for usbmuxd, addition of /var/lib/lockdown, and allow it to use urand, dontaudit sys_resource

Comment 3 Fedora Update System 2014-09-02 19:29:22 UTC
selinux-policy-3.13.1-78.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-78.fc21

Comment 4 Fedora Update System 2014-09-06 00:59:08 UTC
Package selinux-policy-3.13.1-78.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-78.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10184/selinux-policy-3.13.1-78.fc21
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-09-10 02:45:37 UTC
selinux-policy-3.13.1-78.fc21 has been pushed to the Fedora 21 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.