Bug 2207819 - In selinux-policy-3.14.3-117.el8, AVC denials frequently occur in commands executed via insights-client
Summary: In selinux-policy-3.14.3-117.el8, AVC denials frequently occur in commands ex...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-17 02:28 UTC by kyoneyama
Modified: 2023-07-31 12:57 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.3-122.el8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1732 0 None open Allow insights-client map generic log files 2023-06-13 16:30:42 UTC
Red Hat Issue Tracker RHELPLAN-157437 0 None None None 2023-05-17 02:28:58 UTC

Internal Links: 2207894

Description kyoneyama 2023-05-17 02:28:21 UTC
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

Comment 1 Zdenek Pytela 2023-05-17 06:21:33 UTC
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.

Comment 4 Milos Malik 2023-05-17 08:51:43 UTC
Similar issue is reproducible on RHEL-9 and is already filed as BZ#2207894.

Comment 10 Nikola Knazekova 2023-06-15 16:09:56 UTC
*** Bug 2214572 has been marked as a duplicate of this bug. ***


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