Bug 2292897 (CVE-2024-6126)

Summary: CVE-2024-6126 cockpit: Authenticated user can kill any process when enabling pam_env's user_readenv option
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: MODIFIED --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mpitt, 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 flaw was found in the cockpit package. This flaw allows an authenticated user to kill any process when enabling the pam_env's user_readenv option, which leads to a denial of service (DoS) attack.
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: 2290859    
Bug Blocks:    
Deadline: 2024-07-03   

Description Avinash Hanwate 2024-06-18 14:00:49 UTC
In the cockpit component pam-ssh-add uses a call to atoi() to convert the environment variable `SSH_AGENT_PID` to a integer. This assumes that this env variable has not been tampered with and it the env variable has been mangled this can lead to an overflow. The solution proposed is to replace it with a call to strtol() with error checking.

Comment 1 Martin Pitt 2024-06-18 15:29:08 UTC
> if the env variable has been mangled this can lead to an overflow. The solution proposed is to replace it with a call to strtol() with error checking.

Note: This is *not at all* the problem/solution. This was an initial misunderstanding/misreporting. The subject describes it better. See #2290859 for details.

Comment 2 Martin Pitt 2024-07-03 09:00:16 UTC
The embargo got lifted. @ahanwate can you please remove the "security" group from #2290859 ? I am unable to do this myself. The bug should become public now. Thanks!

Comment 4 errata-xmlrpc 2024-11-12 09:24:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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