Bug 1460648 - the bind_ports plugin does not produce any report when matching AVC appears
the bind_ports plugin does not produce any report when matching AVC appears
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: setroubleshoot-plugins (Show other bugs)
7.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Vit Mojzis
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-12 06:35 EDT by Milos Malik
Modified: 2017-12-12 04:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Milos Malik 2017-06-12 06:35:29 EDT
Description of problem:
* the output of sealert -l '*' does not contain any report from the bind_ports plugin, even if the right AVC appeared (AVC that matched conditions of the plugin)

Version-Release number of selected component (if applicable):
setroubleshoot-server-3.2.28-3.el7.x86_64
setroubleshoot-plugins-3.0.65-1.el7.noarch

How reproducible:
* always

Steps to Reproduce:
# seinfo --portcon=789
	portcon tcp 512-1023 system_u:object_r:hi_reserved_port_t:s0
	portcon udp 512-1023 system_u:object_r:hi_reserved_port_t:s0
# sesearch -s auditctl_t -t hi_reserved_port_t -c tcp_socket -p name_bind -A -C -D

# setenforce 0
# runcon system_u:system_r:auditctl_t:s0 bash -c 'nc -l localhost 789'
^C
# setenforce 1
# ausearch -m avc -i -ts recent # only showing the right AVC
----
type=PROCTITLE msg=audit(06/12/2017 06:32:27.642:430) : proctitle=bash -c nc -l localhost 789 
type=SYSCALL msg=audit(06/12/2017 06:32:27.642:430) : arch=x86_64 syscall=bind success=yes exit=0 a0=0x3 a1=0x658c60 a2=0x80 a3=0x7fff3ce4f820 items=0 ppid=9122 pid=27723 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=3 comm=nc exe=/usr/bin/ncat subj=system_u:system_r:auditctl_t:s0 key=(null) 
type=AVC msg=audit(06/12/2017 06:32:27.642:430) : avc:  denied  { net_bind_service } for  pid=27723 comm=nc capability=net_bind_service  scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:system_r:auditctl_t:s0 tclass=capability 
type=AVC msg=audit(06/12/2017 06:32:27.642:430) : avc:  denied  { node_bind } for  pid=27723 comm=nc saddr=::1 src=789 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=tcp_socket 
type=AVC msg=audit(06/12/2017 06:32:27.642:430) : avc:  denied  { name_bind } for  pid=27723 comm=nc src=789 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=tcp_socket 
type=AVC msg=audit(06/12/2017 06:32:27.642:430) : avc:  denied  { bind } for  pid=27723 comm=nc scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:system_r:auditctl_t:s0 tclass=tcp_socket 
----

Actual results:
# sealert -l '*' | grep -i plugin
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
*****  Plugin catchall (100. confidence) suggests   **************************
#

Expected results:
* at least 1 report comes from the bind_ports plugin

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