Bug 983920 - MLS: screen cannot be used for staff_u user in sysadm_r
MLS: screen cannot be used for staff_u user in sysadm_r
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.0
Unspecified Linux
medium Severity medium
: beta
: ---
Assigned To: Miroslav Grepl
Miroslav Vadkerti
: Regression
Depends On:
Blocks: 893599
  Show dependency treegraph
 
Reported: 2013-07-12 05:45 EDT by Miroslav Vadkerti
Modified: 2013-10-03 10:49 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-03 10:49:05 EDT
Type: Bug
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 Miroslav Vadkerti 2013-07-12 05:45:12 EDT
Description of problem:
In RHEL7 with MLS under staff_u user in sysadm_r role I cannot use screen because of AVC below.

[root/sysadm_r/s0@cc-toe2 ~]# getenforce 
Enforcing
[root/sysadm_r/s0@cc-toe2 ~]# id -Z
staff_u:sysadm_r:sysadm_t:s0-s15:c0.c1023
[root/sysadm_r/s0@cc-toe2 ~]# screen 
Cannot open your terminal '/dev/pts/4' - please check.
[root/sysadm_r/s0@cc-toe2 ~]# ausearch -ts 11:40:13 -m avc -sv no -c screen
----
time->Fri Jul 12 11:40:55 2013
type=SYSCALL msg=audit(1373622055.681:20662): arch=c000003e syscall=2 success=no exit=-13 a0=7f92c30b543b a1=80000 a2=1b6 a3=0 items=0 ppid=1940 pid=2278 auid=995 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=84 sgid=84 fsgid=84 ses=6 tty=pts4 comm="screen" exe="/usr/bin/screen" subj=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1373622055.681:20662): avc:  denied  { dac_read_search } for  pid=2278 comm="screen" capability=2  scontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tcontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tclass=capability
type=AVC msg=audit(1373622055.681:20662): avc:  denied  { dac_override } for  pid=2278 comm="screen" capability=1  scontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tcontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tclass=capability
----
time->Fri Jul 12 11:40:55 2013
type=SYSCALL msg=audit(1373622055.682:20663): arch=c000003e syscall=2 success=no exit=-13 a0=7f92caf52210 a1=802 a2=0 a3=0 items=0 ppid=1940 pid=2278 auid=995 uid=0 gid=84 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=6 tty=pts4 comm="screen" exe="/usr/bin/screen" subj=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1373622055.682:20663): avc:  denied  { dac_override } for  pid=2278 comm="screen" capability=1  scontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tcontext=staff_u:sysadm_r:sysadm_screen_t:s0-s15:c0.c1023 tclass=capability

Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-59.el7

How reproducible:
100%

Steps to Reproduce:
see description

Actual results:
screen does not work

Expected results:
screen works as in RHEL6 - regression
Comment 3 Petr Hracek 2013-08-01 07:59:44 EDT
This seems to be selinux issue.
Comment 4 Miroslav Grepl 2013-08-02 04:33:23 EDT
Mirek.
are you still getting it?
Comment 8 Miroslav Vadkerti 2013-10-03 10:49:05 EDT
Sorry for the late answer. I cannot see this with latest stack, thus closing as current release.

# getenforce
Enforcing
# rpm -q selinux-policy screen
selinux-policy-3.12.1-84.el7.noarch
screen-4.1.0-0.17.20120314git3c2946.el7.x86_64
# id -Z
staff_u:sysadm_r:sysadm_t:SystemLow-SystemHigh
# screen

Note You need to log in before you can comment on or make changes to this bug.