Bug 2310451 (CVE-2024-45770)

Summary: CVE-2024-45770 pcp: pmpost symlink attack allows escalating pcp to root user
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: nathans, rkeshri, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in Performance Co-Pilot (PCP). This flaw can only be exploited if an attacker has access to a compromised PCP system account. The issue is related to the pmpost tool, which is used to log messages in the system. Under certain conditions, it runs with high-level privileges.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2313490    
Bug Blocks:    
Deadline: 2024-09-17   

Description OSIDB Bzimport 2024-09-06 17:17:49 UTC
This issue is somewhat similar to CVE-2023-6917 from a previous audit.

`pmpost` is used to append messages to the "PCP notice board". It is called
from different contexts, one of which is as `root` from within the `pmcd`
startup script. The program writes the message provided on the command line
to the file in /var/log/pcp/NOTICES.

The directory /var/log/pcp belongs to pcp:pcp. The file is opened without
passing the `O_NOFOLLOW` flag, thus it will open symlinks placed there by the
pcp user. This would allow `pmpost` to be coerced into creating new files
in arbitrary locations, or to corrupt arbitrary existing files in the system.

Furthermore, if the NOTICES file is newly created and `pmpost` runs as root,
then a `fchown()` to pcp:pcp is executed on the file. Thus it allows to pass
the ownership of arbitrary newly created files in the system to pcp:pcp.

Comment 1 errata-xmlrpc 2024-09-19 11:31:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2024:6846 https://access.redhat.com/errata/RHSA-2024:6846

Comment 2 errata-xmlrpc 2024-09-19 11:37:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Advanced Update Support

Via RHSA-2024:6840 https://access.redhat.com/errata/RHSA-2024:6840

Comment 3 errata-xmlrpc 2024-09-19 11:39:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.6 Telecommunications Update Service

Via RHSA-2024:6843 https://access.redhat.com/errata/RHSA-2024:6843

Comment 4 errata-xmlrpc 2024-09-19 11:48:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:6837 https://access.redhat.com/errata/RHSA-2024:6837

Comment 5 errata-xmlrpc 2024-09-19 12:11:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.4 Telecommunications Update Service

Via RHSA-2024:6842 https://access.redhat.com/errata/RHSA-2024:6842

Comment 6 errata-xmlrpc 2024-09-19 12:11:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:6844 https://access.redhat.com/errata/RHSA-2024:6844

Comment 7 errata-xmlrpc 2024-09-19 12:12:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:6847 https://access.redhat.com/errata/RHSA-2024:6847

Comment 8 errata-xmlrpc 2024-09-19 12:12:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:6848 https://access.redhat.com/errata/RHSA-2024:6848

Comment 9 errata-xmlrpc 2024-11-12 11:11:40 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:9452 https://access.redhat.com/errata/RHSA-2024:9452