Bug 986554 - SELinux is preventing /usr/sbin/sulogin from using the 'getpgid' accesses on a process.
SELinux is preventing /usr/sbin/sulogin from using the 'getpgid' accesses on ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:d94578a33254eea8ef6ff77cfe8...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-20 10:52 EDT by Robert Sigler
Modified: 2013-08-04 18:59 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-69.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-04 18:59:24 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 Robert Sigler 2013-07-20 10:52:26 EDT
Description of problem:
Unknown. selinux violation popped up while mounting (as sudo su -) an xfs file system at /mnt/f18Root. Running interactive appliations: gnome-terminal. 
SELinux is preventing /usr/sbin/sulogin from using the 'getpgid' accesses on a process.

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

If you believe that sulogin should be allowed getpgid access on processes labeled init_t 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 sulogin /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sulogin_t:s0-s0:c0.c1023
Target Context                system_u:system_r:init_t:s0
Target Objects                 [ process ]
Source                        sulogin
Source Path                   /usr/sbin/sulogin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-2.23.1-3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-65.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-302.fc19.x86_64 #1 SMP Sat
                              Jul 6 13:41:07 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-20 10:47:22 EDT
Last Seen                     2013-07-20 10:47:22 EDT
Local ID                      6f1b9e84-d4b3-46a3-82af-10b0891f25c3

Raw Audit Messages
type=AVC msg=audit(1374331642.261:471): avc:  denied  { getpgid } for  pid=3308 comm="sulogin" scontext=system_u:system_r:sulogin_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=process


type=SYSCALL msg=audit(1374331642.261:471): arch=x86_64 syscall=getpgid success=no exit=EACCES a0=1 a1=4 a2=cec a3=21 items=0 ppid=1 pid=3308 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=tty1 comm=sulogin exe=/usr/sbin/sulogin subj=system_u:system_r:sulogin_t:s0-s0:c0.c1023 key=(null)

Hash: sulogin,sulogin_t,init_t,process,getpgid

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-302.fc19.x86_64
libpeerconnection.log: 
type:           libreport
Comment 1 Daniel Walsh 2013-07-21 07:13:44 EDT
This looks like you were running sulogin?
Comment 2 Robert Sigler 2013-07-21 09:45:28 EDT
Yes, that is correct. As user, I executed "sudo su -"; then the violation was triggered.
Comment 3 Daniel Walsh 2013-07-22 15:53:55 EDT
sudo su - does not create a process running as sulogin_t.
These are the only processes that can transition to sulogin, and as far as I n
   type_transition initrc_t sulogin_exec_t : process sulogin_t; 
   type_transition openshift_initrc_t sulogin_exec_t : process sulogin_t; 
   type_transition piranha_pulse_t sulogin_exec_t : process sulogin_t; 
   type_transition condor_startd_t sulogin_exec_t : process sulogin_t; 
   type_transition cluster_t sulogin_exec_t : process sulogin_t; 
   type_transition kdumpctl_t sulogin_exec_t : process sulogin_t; 
   type_transition init_t sulogin_exec_t : process sulogin_t; 

So I have no idea how you got sulogin to fire up, this usually only runs in single user mode.
Comment 4 Daniel Walsh 2013-07-22 15:54:58 EDT
884ae36eb440ed1d178c0abbf155908d04b18b66 allows this in git.
Comment 5 Fedora Update System 2013-08-02 09:28:37 EDT
selinux-policy-3.12.1-69.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-69.fc19
Comment 6 Fedora Update System 2013-08-02 17:54:35 EDT
Package selinux-policy-3.12.1-69.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-69.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14089/selinux-policy-3.12.1-69.fc19
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-08-04 18:59:24 EDT
selinux-policy-3.12.1-69.fc19 has been pushed to the Fedora 19 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.