Description of problem: AVC denials frequently occur in commands executed via insights-client. Many of the denials were fixed in selinux-policy-3.14.3-117.el8, it seems to have occurred again in a package that was omitted from the issue. (No.1) ---- time->Tue May 16 22:05:43 2023 node=localhost.localdomain type=PROCTITLE msg=audit(1684242343.535:129535): proctitle=2F62696E2F66777570646167656E74006765742D64657669636573 node=localhost.localdomain type=MMAP msg=audit(1684242343.535:129535): fd=6 flags=0x1 node=localhost.localdomain type=SYSCALL msg=audit(1684242343.535:129535): arch=c000003e syscall=9 success=yes exit=140366906810368 a0=0 a1=1 a2=1 a3=1 items=0 ppid=197183 pid=197184 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="fwupdagent" exe="/usr/bin/fwupdmgr" subj=system_u:system_r:insights_client_t:s0 key=(null) node=localhost.localdomain type=AVC msg=audit(1684242343.535:129535): avc: denied { map } for pid=197184 comm="fwupdagent" path="/root/.cache/dconf/user" dev="dm-0" ino=68328424 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:object_r:cache_home_t:s0 tclass=file permissive=1 ---- No.2 ---- time->Tue May 16 22:06:18 2023 node=localhost.localdomain type=PROCTITLE msg=audit(1684242378.741:129550): proctitle=2F7573722F62696E2F646F746E6574002D2D76657273696F6E node=localhost.localdomain type=SYSCALL msg=audit(1684242378.741:129550): arch=c000003e syscall=124 success=yes exit=196781 a0=3030b a1=564f5cc6f9c0 a2=4 a3=3 items=0 ppid=197386 pid=197387 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dotnet" exe="/usr/lib64/dotnet/dotnet" subj=system_u:system_r:insights_client_t:s0 key=(null) node=localhost.localdomain type=AVC msg=audit(1684242378.741:129550): avc: denied { getsession } for pid=197387 comm="dotnet" scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:insights_client_t:s0 tclass=process permissive=1 ---- Version-Release number of selected component (if applicable): - Red Hat Enterprise Linux 8.8 - insights-client-3.1.7-12.el8 - selinux-policy-3.14.3-117.el8 - dotnet - fwupd How reproducible: Always Steps to Reproduce: 1. Install relevent packages: # yum install insights-client # yum install dotnet fwupd 2. Register a host: # insights-client --register 3. Start insights-client service immediately: # systemctl start insights-client.service 4. See messages and audit.log # grep setroubleshoot /var/log/messages # ausearch -ts recent -m AVC
rhel89# rpm -q selinux-policy selinux-policy-3.14.3-120.el8.noarch rhel89# sesearch -A -s insights_client_t -t cache_home_t -c file allow domain file_type:file map; [ domain_can_mmap_files ]:True allow insights_client_t cache_home_t:file { append create getattr ioctl link lock open read rename setattr unlink write }; allow insights_client_t file_type:file getattr; allow insights_client_t non_security_file_type:file { getattr ioctl lock open read }; ^^ map perm is missing rhel89# sesearch -A -s insights_client_t -t insights_client_t -c process allow insights_client_t domain:process { getattr signal signull }; allow insights_client_t insights_client_t:process { fork getattr getcap getsched setfscreate setpgid setrlimit setsched sigchld sigkill signal signull sigstop }; ^^ no getsession **getsession** - Get session ID of another process.
Similar issue is reproducible on RHEL-9 and is already filed as BZ#2207894.
*** Bug 2214572 has been marked as a duplicate of this bug. ***