Bug 2278049

Summary: SELinux is preventing pmlogger from 'unlink' accesses on the lnk_file pmlogger.primary.socket.
Product: [Fedora] Fedora Reporter: Michael <michael.scheiffler>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: agerstmayr, jkurik, lchilton, michael.scheiffler, nathans, sfeifer
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a5339131afb2fe9ba8021b615638417e19bb80c69308ddc3dae34fbdc28f48c0;VARIANT_ID=workstation;
Fixed In Version: pcp-6.3.0-2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-08-08 02:42:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: description
none
File: os_info none

Description Michael 2024-04-30 22:10:43 UTC
Description of problem:
SELinux is preventing pmlogger from 'unlink' accesses on the lnk_file pmlogger.primary.socket.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that pmlogger should be allowed unlink access on the pmlogger.primary.socket lnk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'pmlogger' --raw | audit2allow -M my-pmlogger
# semodule -X 300 -i my-pmlogger.pp

Additional Information:
Source Context                system_u:system_r:pcp_pmlogger_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                pmlogger.primary.socket [ lnk_file ]
Source                        pmlogger
Source Path                   pmlogger
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.17-1.fc40.noarch
Local Policy RPM              pcp-selinux-6.2.1-1.fc40.x86_64
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.7-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Apr 17 19:21:08 UTC 2024
                              x86_64
Alert Count                   2
First Seen                    2024-05-01 00:10:02 CEST
Last Seen                     2024-05-01 00:10:03 CEST
Local ID                      4c8af4ac-cb0d-4d72-92c6-8c42f5145d43

Raw Audit Messages
type=AVC msg=audit(1714515003.850:2622): avc:  denied  { unlink } for  pid=117288 comm="pmlogger" name="pmlogger.primary.socket" dev="tmpfs" ino=12258 scontext=system_u:system_r:pcp_pmlogger_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=lnk_file permissive=0


Hash: pmlogger,pcp_pmlogger_t,var_run_t,lnk_file,unlink

Version-Release number of selected component:
selinux-policy-targeted-40.17-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing pmlogger from 'unlink' accesses on the lnk_file pmlogger.primary.socket.
package:        selinux-policy-targeted-40.17-1.fc40.noarch
component:      pcp
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.8.7-300.fc40.x86_64
component:      pcp

Comment 1 Michael 2024-04-30 22:10:45 UTC
Created attachment 2030385 [details]
File: description

Comment 2 Michael 2024-04-30 22:10:47 UTC
Created attachment 2030386 [details]
File: os_info

Comment 3 Fedora Update System 2024-07-30 06:36:31 UTC
FEDORA-2024-55a2b3f839 (pcp-6.3.0-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-55a2b3f839

Comment 5 Jan Kurik 2024-07-30 14:52:36 UTC
Ups, I am sorry for the noise. The reported selinux issues are coming from the old (not yet fixed) build of PCP during "yum update". So the new PCP build (pcp-6.3.0-2.fc40) fixes it.

Comment 6 Fedora Update System 2024-07-31 01:24:29 UTC
FEDORA-2024-55a2b3f839 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-55a2b3f839`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-55a2b3f839

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-08-08 02:42:18 UTC
FEDORA-2024-55a2b3f839 (pcp-6.3.0-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.