Bug 1571591 - sysadm_u cannot work with SCTP sockets
Summary: sysadm_u cannot work with SCTP sockets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-25 07:47 UTC by Milos Malik
Modified: 2018-10-30 10:04 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-205.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:03:16 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:04:01 UTC

Description Milos Malik 2018-04-25 07:47:15 UTC
Description of problem:
 * the only confined user that should be able to work with SCTP sockets is sysadm_u

Version-Release number of selected component (if applicable):
kernel-3.10.0-862.el7.x86_64
kernel-debug-devel-3.10.0-862.el7.x86_64
kernel-headers-3.10.0-862.el7.x86_64
kernel-tools-3.10.0-862.el7.x86_64
kernel-tools-libs-3.10.0-862.el7.x86_64
lksctp-tools-1.0.17-2.el7.x86_64
lksctp-tools-devel-1.0.17-2.el7.x86_64
selinux-policy-3.13.1-192.el7.noarch
selinux-policy-devel-3.13.1-192.el7.noarch
selinux-policy-targeted-3.13.1-192.el7.noarch

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-7.5 machine (targeted policy is active)
2. create a sysadm_u user (useradd -Z sysadm_u ...)
3. log in as the user via ssh
4. run checksctp tool

Actual results (enforcing mode):
----
type=PROCTITLE msg=audit(04/25/2018 03:36:27.694:445) : proctitle=/usr/bin/checksctp 
type=SYSCALL msg=audit(04/25/2018 03:36:27.694:445) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=inet a1=SOCK_STREAM a2=sctp a3=0x7ffe8aab9460 items=0 ppid=15267 pid=15268 auid=unknown(1000) uid=unknown(1000) gid=unknown(1000) euid=unknown(1000) suid=unknown(1000) fsuid=unknown(1000) egid=unknown(1000) sgid=unknown(1000) fsgid=unknown(1000) tty=pts2 ses=8 comm=checksctp exe=/usr/bin/checksctp subj=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(04/25/2018 03:36:27.694:445) : avc:  denied  { create } for  pid=15268 comm=checksctp scontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tclass=rawip_socket 
----

Expected results:
 * no SELinux denials

Comment 2 Milos Malik 2018-06-26 09:12:20 UTC
# rpm -qa selinux\*
selinux-policy-devel-3.13.1-204.el7.noarch
selinux-policy-doc-3.13.1-204.el7.noarch
selinux-policy-mls-3.13.1-204.el7.noarch
selinux-policy-targeted-3.13.1-204.el7.noarch
selinux-policy-3.13.1-204.el7.noarch
selinux-policy-sandbox-3.13.1-204.el7.noarch
selinux-policy-minimum-3.13.1-204.el7.noarch
# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts recent
----
type=PROCTITLE msg=audit(06/26/2018 11:08:00.149:133) : proctitle=checksctp 
type=SYSCALL msg=audit(06/26/2018 11:08:00.149:133) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=inet a1=SOCK_STREAM a2=sctp a3=0x7ffe6f394560 items=0 ppid=1498 pid=1545 auid=sysadm-user uid=sysadm-user gid=sysadm-user euid=sysadm-user suid=sysadm-user fsuid=sysadm-user egid=sysadm-user sgid=sysadm-user fsgid=sysadm-user tty=tty1 ses=3 comm=checksctp exe=/usr/bin/checksctp subj=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(06/26/2018 11:08:00.149:133) : avc:  denied  { create } for  pid=1545 comm=checksctp scontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tclass=sctp_socket permissive=0 
----

The issue is not fixed:

# sesearch -s sysadm_t -t sysadm_t -c sctp_socket -A -C -D
Found 3 semantic av rules:
   allow sysadm_t domain : sctp_socket getattr ; 
   dontaudit sysadm_t domain : sctp_socket getattr ; 
   dontaudit domain domain : sctp_socket { read write } ; 
#

Comment 8 errata-xmlrpc 2018-10-30 10:03:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3111


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