Bug 723391
Summary: | tmux doesn't work without unconfined, but this may be a tmux behaviour issue | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robin Powell <rlpowell> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 15 | CC: | dominick.grift, dwalsh, mgrepl |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.9.16-38.fc15 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-07 00:18:45 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
Robin Powell
2011-07-20 02:30:28 UTC
First, thanks you try to use confined users and report bugs. The problem is we don't have a policy for tmux. So there is no transition for confined users. We could try to treat tmux with screen policy. Could you try to execute # chcon -t screen_exec_t /usr/bin/tmux # chcon -R -t screen_var_run_t /var/run/tmux Yep! That seems to do the trick. -Robin Hmm, no, not quite; that *mostly* works. The following is required to stop the AVC messages entirely: #============= user_screen_t ============== allow user_screen_t user_t:unix_stream_socket connectto; #============= staff_screen_t ============== allow staff_screen_t staff_t:dir search; allow staff_screen_t staff_t:file { read open getattr }; The weird part is the staff_t dir and file stuff; when I run tmux as a staff_t user, those AVCs simply print out continuously, about once a second, like so (various lines with various allows allowed or not): type=AVC msg=audit(1311474188.863:113454): avc: denied { search } for pid=31153 comm="tmux" name="31154" dev=proc ino=104906 scontext=staff_u:staff_r:staff_screen_t:s0 tcontext=staff_u:staff_r:staff_t:s0 tclass=dir type=AVC msg=audit(1311474332.152:114587): avc: denied { read } for pid=31235 comm="tmux" name="cmdline" dev=proc ino=105414 scontext=staff_u:staff_r:staff_screen_t:s0 tcontext=staff_u:staff_r:staff_t:s0 tclass=file type=AVC msg=audit(1311474586.902:117091): avc: denied { open } for pid=31711 comm="tmux" name="cmdline" dev=proc ino=106700 scontext=staff_u:staff_r:staff_screen_t:s0 tcontext=staff_u:staff_r:staff_t:s0 tclass=file type=AVC msg=audit(1311474882.929:118192): avc: denied { getattr } for pid=31778 comm="tmux" path="/proc/31779/cmdline" dev=proc ino=106967 scontext=staff_u:staff_r:staff_screen_t:s0 tcontext=staff_u:staff_r:staff_t:s0 tclass=file So apparently tmux looks at the /proc/ cmdline file about once a second? Dunno what's up with that (I'll let the tmux team know). -Robin Ah. That poking at the /proc/ cmdline is a useful/needed feature; it's so that windows can be named for the command running in them. -Robin Whoops, user_t needs it too: #============= user_screen_t ============== allow user_screen_t user_t:unix_stream_socket connectto; allow user_screen_t user_t:dir search; allow user_screen_t user_t:file { read open getattr }; #============= staff_screen_t ============== allow staff_screen_t staff_t:dir search; allow staff_screen_t staff_t:file { read open getattr }; -Robin Looks like we need to add ps_process_pattern($1_screen_t, $3) TO screen_role_template. I just updated the policy in F16. Fixed in selinux-policy-3.9.16-36.fc15 selinux-policy-3.9.16-37.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-37.fc15 Do those chcon changes need to be propagated into the tmux package as well, or is this the entire fix? -Robin No the selinux-policy package will change the labels. Package selinux-policy-3.9.16-37.fc15: * should fix your issue, * was pushed to the Fedora 15 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.9.16-37.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-37.fc15 then log in and leave karma (feedback). Package selinux-policy-3.9.16-38.fc15: * should fix your issue, * was pushed to the Fedora 15 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.9.16-38.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-38.fc15 then log in and leave karma (feedback). selinux-policy-3.9.16-38.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |