Skip to content

environment: Collect and SELinux AVCs that occured during the scenario

David Jaša requested to merge dj/log-avcs into main

Example of appended in case of scenario pass:

(90) SELinux AVCs
----
type=PROCTITLE msg=audit(11/02/23 14:36:00.727:4647) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:36:00.727:4647) : arch=x86_64 syscall=sendto success=yes exit=3 a0=0x6 a1=0x5587272b34b0 a2=0x3 a3=0x0 items=0 ppid=1 pid=34639 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:36:00.727:4647) : avc:  denied  { sendto } for  pid=34639 comm=hostapd path=/tmp/wpa_ctrl_34864-1 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket permissive=1 
type=AVC msg=audit(11/02/23 14:36:00.727:4647) : avc:  denied  { write } for  pid=34639 comm=hostapd name=wpa_ctrl_34864-1 dev="vda4" ino=17029239 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=1 
----
type=PROCTITLE msg=audit(11/02/23 14:36:05.733:4651) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:36:05.733:4651) : arch=x86_64 syscall=sendto success=yes exit=5 a0=0x6 a1=0x5587272b34b0 a2=0x5 a3=0x0 items=0 ppid=1 pid=34639 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:36:05.733:4651) : avc:  denied  { write } for  pid=34639 comm=hostapd name=wpa_ctrl_34864-1 dev="vda4" ino=17029239 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=1 
----
type=PROCTITLE msg=audit(11/02/23 14:36:09.212:4662) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:36:09.212:4662) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffe2a7aa600 a2=0x0 a3=0x7f87863b13e0 items=0 ppid=1 pid=34639 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:36:09.212:4662) : avc:  denied  { write } for  pid=34639 comm=hostapd name=wpa_ctrl_34864-1 dev="vda4" ino=17029239 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:36:09.212:4663) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:36:09.212:4663) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffe2a7aa800 a2=0x0 a3=0x7f87863b13e0 items=0 ppid=1 pid=34639 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:36:09.212:4663) : avc:  denied  { write } for  pid=34639 comm=hostapd name=wpa_ctrl_34864-1 dev="vda4" ino=17029239 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:36:09.212:4664) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:36:09.212:4664) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffe2a7aa800 a2=0x0 a3=0x7f87863b13e0 items=0 ppid=1 pid=34639 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:36:09.212:4664) : avc:  denied  { write } for  pid=34639 comm=hostapd name=wpa_ctrl_34864-1 dev="vda4" ino=17029239 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 

In case of scenario failure or NMCI_DEBUG being set, output of sealert -l ID commands is also attached

(103) SELinux AVCs
----
type=PROCTITLE msg=audit(11/02/23 14:39:49.831:4778) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:39:49.831:4778) : arch=x86_64 syscall=sendto success=no exit=EACCES(Permission denied) a0=0x6 a1=0x558a3bc414b0 a2=0x3 a3=0x0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:39:49.831:4778) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:39:55.348:4782) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:39:55.348:4782) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556ee0 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:39:55.348:4782) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:39:55.348:4783) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:39:55.348:4783) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556ef0 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:39:55.348:4783) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:39:55.380:4784) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:39:55.380:4784) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556ec0 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:39:55.380:4784) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:40:08.405:4800) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:40:08.405:4800) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556d30 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:40:08.405:4800) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:40:08.405:4801) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:40:08.405:4801) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556f30 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:40:08.405:4801) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(11/02/23 14:40:08.405:4802) : proctitle=/usr/sbin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B -d 
type=SYSCALL msg=audit(11/02/23 14:40:08.405:4802) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x6 a1=0x7ffc2e556f30 a2=0x0 a3=0x7f9b62db13e0 items=0 ppid=1 pid=35419 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null) 
type=AVC msg=audit(11/02/23 14:40:08.405:4802) : avc:  denied  { write } for  pid=35419 comm=hostapd name=wpa_ctrl_35640-1 dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0 
(105) sealerts of AVCs
sealert -l 86ca1848-23e5-472b-ba9a-2e8624c2252e
SELinux is preventing /usr/sbin/hostapd from write access on the sock_file wpa_ctrl_35640-1.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that hostapd should be allowed write access on the wpa_ctrl_35640-1 sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp


Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                wpa_ctrl_35640-1 [ sock_file ]
Source                        hostapd
Source Path                   /usr/sbin/hostapd
Port                          <Unknown>
Host                          rhel9-nightly
Source RPM Packages           hostapd-2.10-1.el9.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.1.23-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-38.1.23-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     rhel9-nightly
Platform                      Linux rhel9-nightly 5.14.0-362.8.1.el9_3.x86_64 #1
                              SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023
                              x86_64 x86_64
Alert Count                   144
First Seen                    2023-11-01 09:32:14 EDT
Last Seen                     2023-11-02 14:39:55 EDT
Local ID                      86ca1848-23e5-472b-ba9a-2e8624c2252e

Raw Audit Messages
type=AVC msg=audit(1698950395.380:4784): avc:  denied  { write } for  pid=35419 comm="hostapd" name="wpa_ctrl_35640-1" dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0


type=SYSCALL msg=audit(1698950395.380:4784): arch=x86_64 syscall=sendmsg success=no exit=EACCES a0=6 a1=7ffc2e556ec0 a2=0 a3=7f9b62db13e0 items=0 ppid=1 pid=35419 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null)

Hash: hostapd,hostapd_t,tmp_t,sock_file,write



sealert -l 86ca1848-23e5-472b-ba9a-2e8624c2252e
SELinux is preventing /usr/sbin/hostapd from write access on the sock_file wpa_ctrl_35640-1.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that hostapd should be allowed write access on the wpa_ctrl_35640-1 sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp


Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                wpa_ctrl_35640-1 [ sock_file ]
Source                        hostapd
Source Path                   /usr/sbin/hostapd
Port                          <Unknown>
Host                          rhel9-nightly
Source RPM Packages           hostapd-2.10-1.el9.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.1.23-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-38.1.23-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     rhel9-nightly
Platform                      Linux rhel9-nightly 5.14.0-362.8.1.el9_3.x86_64 #1
                              SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023
                              x86_64 x86_64
Alert Count                   144
First Seen                    2023-11-01 09:32:14 EDT
Last Seen                     2023-11-02 14:39:55 EDT
Local ID                      86ca1848-23e5-472b-ba9a-2e8624c2252e

Raw Audit Messages
type=AVC msg=audit(1698950395.380:4784): avc:  denied  { write } for  pid=35419 comm="hostapd" name="wpa_ctrl_35640-1" dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0


type=SYSCALL msg=audit(1698950395.380:4784): arch=x86_64 syscall=sendmsg success=no exit=EACCES a0=6 a1=7ffc2e556ec0 a2=0 a3=7f9b62db13e0 items=0 ppid=1 pid=35419 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null)

Hash: hostapd,hostapd_t,tmp_t,sock_file,write



sealert -l 86ca1848-23e5-472b-ba9a-2e8624c2252e
SELinux is preventing /usr/sbin/hostapd from write access on the sock_file wpa_ctrl_35640-1.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that hostapd should be allowed write access on the wpa_ctrl_35640-1 sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp


Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                wpa_ctrl_35640-1 [ sock_file ]
Source                        hostapd
Source Path                   /usr/sbin/hostapd
Port                          <Unknown>
Host                          rhel9-nightly
Source RPM Packages           hostapd-2.10-1.el9.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.1.23-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-38.1.23-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     rhel9-nightly
Platform                      Linux rhel9-nightly 5.14.0-362.8.1.el9_3.x86_64 #1
                              SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023
                              x86_64 x86_64
Alert Count                   144
First Seen                    2023-11-01 09:32:14 EDT
Last Seen                     2023-11-02 14:39:55 EDT
Local ID                      86ca1848-23e5-472b-ba9a-2e8624c2252e

Raw Audit Messages
type=AVC msg=audit(1698950395.380:4784): avc:  denied  { write } for  pid=35419 comm="hostapd" name="wpa_ctrl_35640-1" dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0


type=SYSCALL msg=audit(1698950395.380:4784): arch=x86_64 syscall=sendmsg success=no exit=EACCES a0=6 a1=7ffc2e556ec0 a2=0 a3=7f9b62db13e0 items=0 ppid=1 pid=35419 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null)

Hash: hostapd,hostapd_t,tmp_t,sock_file,write



sealert -l 86ca1848-23e5-472b-ba9a-2e8624c2252e
SELinux is preventing /usr/sbin/hostapd from write access on the sock_file wpa_ctrl_35640-1.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that hostapd should be allowed write access on the wpa_ctrl_35640-1 sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'hostapd' --raw | audit2allow -M my-hostapd
# semodule -X 300 -i my-hostapd.pp


Additional Information:
Source Context                system_u:system_r:hostapd_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                wpa_ctrl_35640-1 [ sock_file ]
Source                        hostapd
Source Path                   /usr/sbin/hostapd
Port                          <Unknown>
Host                          rhel9-nightly
Source RPM Packages           hostapd-2.10-1.el9.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.1.23-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-38.1.23-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     rhel9-nightly
Platform                      Linux rhel9-nightly 5.14.0-362.8.1.el9_3.x86_64 #1
                              SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023
                              x86_64 x86_64
Alert Count                   147
First Seen                    2023-11-01 09:32:14 EDT
Last Seen                     2023-11-02 14:40:08 EDT
Local ID                      86ca1848-23e5-472b-ba9a-2e8624c2252e

Raw Audit Messages
type=AVC msg=audit(1698950408.405:4802): avc:  denied  { write } for  pid=35419 comm="hostapd" name="wpa_ctrl_35640-1" dev="vda4" ino=17031336 scontext=system_u:system_r:hostapd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=sock_file permissive=0


type=SYSCALL msg=audit(1698950408.405:4802): arch=x86_64 syscall=sendmsg success=no exit=EACCES a0=6 a1=7ffc2e556f30 a2=0 a3=7f9b62db13e0 items=0 ppid=1 pid=35419 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hostapd exe=/usr/sbin/hostapd subj=system_u:system_r:hostapd_t:s0 key=(null)

Hash: hostapd,hostapd_t,tmp_t,sock_file,write
Edited by David Jaša

Merge request reports

Loading