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 2185158 - [RHEL8.7/Insights/SELinux/Bug] Insights-client SELinux AVC denials for python3 and teamdctl
Summary: [RHEL8.7/Insights/SELinux/Bug] Insights-client SELinux AVC denials for python...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.7
Hardware: Unspecified
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-07 07:57 UTC by Nikhil Gupta
Modified: 2023-11-14 17:59 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.14.3-119.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2190178 (view as bug list)
Environment:
Last Closed: 2023-11-14 15:47:46 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 1653 0 None open Allow insights-client get quotas of all filesystems 2023-04-20 19:58:10 UTC
Red Hat Issue Tracker RHELPLAN-154227 0 None None None 2023-04-07 08:00:33 UTC
Red Hat Product Errata RHBA-2023:7091 0 None None None 2023-11-14 15:48:23 UTC

Description Nikhil Gupta 2023-04-07 07:57:25 UTC
Description of problem:
SELinux AVC denials:
~~~
type=AVC msg=audit(1680656450.138:202643): avc:  denied  { sendto } for  pid=3164511 comm="python3" path="/run/awx-rsyslog/rsyslog.sock" scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket permissive=1
type=AVC msg=audit(1680656450.138:202643): avc:  denied  { write } for  pid=3164511 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
type=AVC msg=audit(1680656467.027:202956): avc:  denied  { sendto } for  pid=3164921 comm="python3" path="/run/awx-rsyslog/rsyslog.sock" scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket permissive=1
type=AVC msg=audit(1680656467.027:202956): avc:  denied  { write } for  pid=3164921 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
type=AVC msg=audit(1680656474.534:202985): avc:  denied  { sendto } for  pid=3165049 comm="python3" path="/run/awx-rsyslog/rsyslog.sock" scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket permissive=1
type=AVC msg=audit(1680656474.534:202985): avc:  denied  { write } for  pid=3165049 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
...

type=AVC msg=audit(1680656378.276:185214): avc:  denied  { net_raw } for  pid=3195599 comm="teamdctl" capability=13  scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:insights_client_t:s0 tclass=capability permissive=1
type=AVC msg=audit(1680656378.276:185214): avc:  denied  { create } for  pid=3195599 comm="teamdctl" scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:insights_client_t:s0 tclass=packet_socket permissive=1
type=AVC msg=audit(1680656378.276:185215): avc:  denied  { ioctl } for  pid=3195599 comm="teamdctl" path="socket:[230657242]" dev="sockfs" ino=230657242 ioctlcmd=0x8933 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:system_r:insights_client_t:s0 tclass=packet_socket permissive=1
type=AVC msg=audit(1680656378.285:185216): avc:  denied  { write } for  pid=3195599 comm="teamdctl" name="team0.sock" dev="tmpfs" ino=93399 scontext=system_u:system_r:insights_client_t:s0 tcontext=system_u:object_r:NetworkManager_var_run_t:s0 tclass=sock_file permissive=1
~~~

Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-117.el8.noarch                        
selinux-policy-targeted-3.14.3-117.el8.noarch               

How reproducible:
Always

Steps to Reproduce:
1. Register the host with Insights
2. Wait for the scheduled run of it.


Actual results:
AVC denials for python3 and teamdctl

Expected results:
Insights-client should run without any avc denials


Additional info:

Comment 9 Zdenek Pytela 2023-04-27 13:48:12 UTC
(In reply to Nikhil Gupta from comment #0)
> Description of problem:
> SELinux AVC denials:
> ~~~
> type=AVC msg=audit(1680656450.138:202643): avc:  denied  { sendto } for 
> pid=3164511 comm="python3" path="/run/awx-rsyslog/rsyslog.sock"
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket
> permissive=1
> type=AVC msg=audit(1680656450.138:202643): avc:  denied  { write } for 
> pid=3164511 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
> type=AVC msg=audit(1680656467.027:202956): avc:  denied  { sendto } for 
> pid=3164921 comm="python3" path="/run/awx-rsyslog/rsyslog.sock"
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket
> permissive=1
> type=AVC msg=audit(1680656467.027:202956): avc:  denied  { write } for 
> pid=3164921 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
> type=AVC msg=audit(1680656474.534:202985): avc:  denied  { sendto } for 
> pid=3165049 comm="python3" path="/run/awx-rsyslog/rsyslog.sock"
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_dgram_socket
> permissive=1
> type=AVC msg=audit(1680656474.534:202985): avc:  denied  { write } for 
> pid=3165049 comm="python3" name="rsyslog.sock" dev="tmpfs" ino=44542
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=1
> ...
I'd like to point to the fact these permissions are a result of custom rsyslog settings and are not addressed. A local SELinux module and/or fcontext settings are required.

> type=AVC msg=audit(1680656378.276:185214): avc:  denied  { net_raw } for 
> pid=3195599 comm="teamdctl" capability=13 
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:insights_client_t:s0 tclass=capability
> permissive=1
> type=AVC msg=audit(1680656378.276:185214): avc:  denied  { create } for 
> pid=3195599 comm="teamdctl" scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:insights_client_t:s0 tclass=packet_socket
> permissive=1
> type=AVC msg=audit(1680656378.276:185215): avc:  denied  { ioctl } for 
> pid=3195599 comm="teamdctl" path="socket:[230657242]" dev="sockfs"
> ino=230657242 ioctlcmd=0x8933
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:system_r:insights_client_t:s0 tclass=packet_socket
> permissive=1
> type=AVC msg=audit(1680656378.285:185216): avc:  denied  { write } for 
> pid=3195599 comm="teamdctl" name="team0.sock" dev="tmpfs" ino=93399
> scontext=system_u:system_r:insights_client_t:s0
> tcontext=system_u:object_r:NetworkManager_var_run_t:s0 tclass=sock_file
> permissive=1
These permissions are addressed by the latest build.

Comment 12 errata-xmlrpc 2023-11-14 15:47:46 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.