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 2050094 - BCC PMDA usdt_hits , tcplife, tcpperpid and execsnoop modules - selinux AVC issues
Summary: BCC PMDA usdt_hits , tcplife, tcpperpid and execsnoop modules - selinux AVC i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Gerstmayr
QA Contact: Jan Kurik
Jacob Taylor Valdez
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-03 09:01 UTC by Jan Kurik
Modified: 2023-05-16 08:40 UTC (History)
3 users (show)

Fixed In Version: pcp-5.3.7-9.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 08:13:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-110930 0 None None None 2022-02-03 09:17:55 UTC
Red Hat Product Errata RHBA-2023:2745 0 None None None 2023-05-16 08:13:33 UTC

Description Jan Kurik 2022-02-03 09:01:35 UTC
Description of problem:
When using "usdt_hits", "tcplife", "tcpperpid" or "execsnoop" module of bcc pmda, I am getting selinux AVC reports.

Version-Release number of selected component (if applicable):
Compose: RHEL-8.6.0-20220131.1
pcp-5.3.5-8.el8
selinux-policy-3.14.3-89.el8

How reproducible:
Always on all supported architectures.

Steps to Reproduce:
1. Install pcp, pcp-pmda-bcc and pcp-testuite
2. Tun testcases #1150 , #1155 , #1156 , #1178 of the pcp testsuite

Actual results:
Selinux generates the following AVC records:

# ausearch -m AVC
type=PROCTITLE msg=audit(1643876401.787:14418): proctitle=707974686F6E33002F7661722F6C69622F7063702F706D6461732F6263632F706D64616263632E707974686F6E
type=SYSCALL msg=audit(1643876401.787:14418): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=1000 a2=5 a3=1 items=0 ppid=213527 pid=216047 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="python3" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:pcp_pmcd_t:s0 key=(null)
type=AVC msg=audit(1643876401.787:14418): avc:  denied  { execute } for  pid=216047 comm="python3" path=2F6D656D66643A6C6962666669202864656C6574656429 dev="tmpfs" ino=919210 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:pcp_tmpfs_t:s0 tclass=file permissive=0

# audit2allow -a
#============= pcp_pmcd_t ==============
allow pcp_pmcd_t pcp_tmpfs_t:file execute;


Expected results:
No AVC records reported.

Additional info:
I briefly checked if this is not an issue with those testcases, however I have not find anything suspicious in the testcase code.
I have not seen these AVC issues in previous releases, so it might be also related to the recent changes in selinux-policy package.

Comment 5 Andreas Gerstmayr 2022-05-13 11:51:32 UTC
fixed upstream (and backported to stable branch) with:

commit 04ac47e570c47cb1f953cf9d5f8cac2a656238e6 (HEAD -> stable, upstream/stable)
Author: Andreas Gerstmayr <agerstmayr>
Date:   Fri May 13 13:47:50 2022 +0200
 
    selinux: allow bcc PMDA to execute its private memfd: objects created by ctypes/libffi (#1593)
    
    Resolves the following AVC:
    
        type=AVC msg=audit(YYY.787): avc:  denied  { execute } for  pid=216047 comm="python3" path=2F6D656D66643A6C6962666669202864656C6574656429 dev="tmpfs" ino=919210 scontext=system_u:sy>
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2050094

Comment 10 errata-xmlrpc 2023-05-16 08:13:26 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 (pcp 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:2745


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