RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: CLOSED ERRATA
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-11-14 17:57 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.14.3-122.el8
Doc Type: Bug Fix
Doc Text:
Permissions for insights-client added to the SELinux policy Cause: The insights-client service requires permissions which were not in the previous selinux-policy versions. Consequence: As a consequence, some components of insights-client did not work correctly and reported access vector cache (AVC) error messages. Fix: This update adds new permissions to the SELinux policy. Result: As a result, insights-client runs correctly without reporting AVC errors. Resolves: 2185158 2207819 2214572 2225233 2229559
Clone Of:
Environment:
Last Closed: 2023-11-14 15:47:52 UTC
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
Red Hat Product Errata RHBA-2023:7091 0 None None None 2023-11-14 15:48:09 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. ***

Comment 29 errata-xmlrpc 2023-11-14 15:47:52 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 (selinux-policy bug fix and enhancement update), 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-2023:7091


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