Bug 833713

Summary: SELinux is preventing /usr/bin/login from 'execute' accesses on the file tmux.
Product: [Fedora] Fedora Reporter: Frederik <d17323>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f3164a4aa14f8b3ea9c2747aa4aac18bc45915a22ccadc412da53ec2b361797c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-30 21:51:44 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 Frederik 2012-06-20 07:43:12 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.2-4.fc17.x86_64
time:           Wed 20 Jun 2012 09:42:20 AM CEST

:--- Start of user comments ---
:As per https://bugzilla.redhat.com/show_bug.cgi?id=827592, chsh now allows changing the shell to tmux (/usr/bin/tmux). Unfortunately, changing it to that causes an inability to log in, as /usr/bin/login is not allowed to execute it.
:--- End of user comments ---
:SELinux is preventing /usr/bin/login from 'execute' accesses on the file tmux.
:*****  Plugin leaks (86.2 confidence) suggests  ******************************
:If you want to ignore login trying to execute access the tmux file, because you believe it should not need this access.
:Then you should report this as a bug.  
:You can generate a local policy module to dontaudit this access.
:# grep /usr/bin/login /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:*****  Plugin catchall (14.7 confidence) suggests  ***************************
:If you believe that login should be allowed execute access on the tmux file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep login /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:local_login_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:screen_exec_t:s0
:Target Objects                tmux [ file ]
:Source                        login
:Source Path                   /usr/bin/login
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           util-linux-2.21.2-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-132.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.2-4.fc17.x86_64 #1 SMP Thu
:                              Jun 14 22:22:05 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Wed 20 Jun 2012 09:37:23 AM CEST
:Last Seen                     Wed 20 Jun 2012 09:37:23 AM CEST
:Local ID                      a744812c-6162-47c2-b404-e6250b467d30
:Raw Audit Messages
:type=AVC msg=audit(1340177843.470:49): avc:  denied  { execute } for  pid=871 comm="login" name="tmux" dev="dm-1" ino=418952 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:screen_exec_t:s0 tclass=file
:type=SYSCALL msg=audit(1340177843.470:49): arch=x86_64 syscall=execve success=no exit=EACCES a0=1bc150d a1=7fff40ee0268 a2=1bc5890 a3=7fff40edff30 items=0 ppid=599 pid=871 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=tty1 ses=1 comm=login exe=/usr/bin/login subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)
:Hash: login,local_login_t,screen_exec_t,file,execute
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied

Comment 1 Miroslav Grepl 2012-06-20 08:01:29 UTC
Fixed in selinux-policy-3.10.0-133.fc17

Comment 2 Frederik 2012-06-20 08:33:47 UTC
Fixed in 15 minutes, wow. Very nice, thanks so much.

Comment 3 Fedora Update System 2012-06-26 21:47:57 UTC
selinux-policy-3.10.0-134.fc17 has been submitted as an update for Fedora 17.

Comment 4 Fedora Update System 2012-06-28 03:38:08 UTC
Package selinux-policy-3.10.0-134.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-134.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-06-30 21:51:44 UTC
selinux-policy-3.10.0-134.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.