Bug 823295

Summary: SELinux is preventing /usr/sbin/gpsd from using the 'sys_admin' capabilities.
Product: [Fedora] Fedora Reporter: Michal Ambroz <rebus>
Component: gpsdAssignee: Douglas E. Warner <silfreed>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl, mlichvar, silfreed
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:987db0c8a74debf021e2a8cf9ba5873f7c8271893a0c4938237a9314c8ecb3f6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 10:53:42 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 Michal Ambroz 2012-05-20 16:28:14 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.4-5.fc17.x86_64
time:           Sun 20 May 2012 06:27:56 PM CEST

description:
:SELinux is preventing /usr/sbin/gpsd from using the 'sys_admin' capabilities.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that gpsd 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 gpsd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:gpsd_t:s0-s0:c0.c1023
:Target Context                unconfined_u:unconfined_r:gpsd_t:s0-s0:c0.c1023
:Target Objects                 [ capability ]
:Source                        gpsd
:Source Path                   /usr/sbin/gpsd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           gpsd-3.5-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-121.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.4-5.fc17.x86_64 #1 SMP
:                              Mon May 7 17:29:34 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Sun 20 May 2012 06:08:49 PM CEST
:Last Seen                     Sun 20 May 2012 06:08:49 PM CEST
:Local ID                      2f50ed87-e7ec-48ce-8fda-1d7656045166
:
:Raw Audit Messages
:type=AVC msg=audit(1337530129.209:21548): avc:  denied  { sys_admin } for  pid=7709 comm="gpsd" capability=21  scontext=unconfined_u:unconfined_r:gpsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:gpsd_t:s0-s0:c0.c1023 tclass=capability
:
:
:type=SYSCALL msg=audit(1337530129.209:21548): arch=x86_64 syscall=open success=no exit=EBUSY a0=634710 a1=900 a2=60bda0 a3=40a7f3 items=0 ppid=7676 pid=7709 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=480 comm=gpsd exe=/usr/sbin/gpsd subj=unconfined_u:unconfined_r:gpsd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: gpsd,gpsd_t,gpsd_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-05-21 11:15:21 UTC
What were you doing when this happened?


       CAP_SYS_ADMIN
              * Perform a range of system  administration  operations  including:
                quotactl(2), mount(2), umount(2), swapon(2), swapoff(2), sethostā€
                name(2), and setdomainname(2);
              * perform IPC_SET and IPC_RMID operations on arbitrary System V IPC
                objects;
              * perform  operations  on  trusted and security Extended Attributes
                (see attr(5));
              * use lookup_dcookie(2);
              * use ioprio_set(2) to assign  IOPRIO_CLASS_RT  and  (before  Linux
                2.6.25) IOPRIO_CLASS_IDLE I/O scheduling classes;
              * forge UID when passing socket credentials;
              * exceed /proc/sys/fs/file-max, the system-wide limit on the number
                of open files, in system calls that open files (e.g.,  accept(2),
                execve(2), open(2), pipe(2));
              * employ CLONE_NEWNS flag with clone(2) and unshare(2);
              * perform KEYCTL_CHOWN and KEYCTL_SETPERM keyctl(2) operations;
              * perform madvise(2) MADV_HWPOISON operation.

Comment 2 Fedora End Of Life 2013-07-04 03:24:25 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2013-08-01 10:53:50 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.