Cloudanix VulnDB

CVE-2024-6126

Low · 3.2

CVSS

3.2

EPSS

0.3%

Published

Jul 3, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A logged-in user can stop important programs from running, making the computer less reliable for its normal tasks.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

An authenticated local user can leverage the pam_env module's user_readenv option to kill arbitrary processes on the system, resulting in denial of service.

Why it matters to the business

Disruption of critical services and processes, leading to system instability and potential downtime for administrative operations managed through cockpit.

How an attack unfolds

An attacker with local authenticated access to a system using cockpit enables or abuses the user_readenv option in pam_env to inject environment variables that trigger termination of any process, achieving denial of service without requiring elevated privileges beyond login.

How to fix it

Disable the user_readenv option in pam_env configuration files such as /etc/security/pam_env.conf and review cockpit-related PAM setups; apply any available package updates for cockpit to address the flaw.

How to confirm the fix worked

Inspect PAM configuration files for the presence of user_readenv=1 or similar settings, verify process kill permissions under authenticated sessions, and confirm no unauthorized process termination occurs during testing.

Typical attack path

  1. Obtain local authenticated access to the target system
  2. Access or modify pam configuration to enable user_readenv in pam_env
  3. Interact with cockpit to trigger the environment variable processing
  4. Kill targeted processes to cause denial of service

How to detect it

Review system and PAM logs such as /var/log/auth.log or /var/log/secure for entries related to pam_env processing, and check process accounting or audit logs for unexpected terminations of critical services initiated by cockpit sessions.

What your security team should do

  • Audit all systems using cockpit for pam_env user_readenv settings
  • Restrict pam_env configurations to prevent user-controlled environment variables
  • Monitor authentication and process management logs for anomalies
  • Apply cockpit updates as they become available in distributions

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:9 cockpit 0 323.1-1.el9_5
AlmaLinux:9 cockpit-bridge 0 323.1-1.el9_5
AlmaLinux:9 cockpit-doc 0 323.1-1.el9_5
AlmaLinux:9 cockpit-packagekit 0 323.1-1.el9_5
AlmaLinux:9 cockpit-pcp 0 323.1-1.el9_5
AlmaLinux:9 cockpit-storaged 0 323.1-1.el9_5
AlmaLinux:9 cockpit-system 0 323.1-1.el9_5
AlmaLinux:9 cockpit-ws 0 323.1-1.el9_5
Debian:11 cockpit 0 No fix
Debian:12 cockpit 0 287.1-0+deb12u3
Debian:13 cockpit 0 320-1
Mageia:9 cockpit 0 338-1.6.mga9
Red Hat:enterprise_linux:9::appstream cockpit 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-bridge 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-debuginfo 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-debugsource 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-doc 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-packagekit 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-pcp 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-storaged 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-system 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::appstream cockpit-ws 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-bridge 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-debuginfo 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-debugsource 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-doc 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-packagekit 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-pcp 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-storaged 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-system 0 0:323.1-1.el9_5
Red Hat:enterprise_linux:9::baseos cockpit-ws 0 0:323.1-1.el9_5
Rocky Linux:9 cockpit 0 0:323.1-1.el9_5
SUSE:Linux Enterprise Micro 5.1 cockpit 0 195.12-150300.10.6.1
SUSE:Linux Enterprise Micro 5.2 cockpit 0 251.3-150300.6.3.1
SUSE:Linux Enterprise Micro 5.3 cockpit 0 251.3-150400.8.3.1
SUSE:Linux Enterprise Micro 5.4 cockpit 0 251.3-150400.6.7.1
SUSE:Linux Enterprise Micro 5.5 cockpit 0 298-150500.3.6.1
SUSE:Package Hub 15 SP6 cockpit 0 320-bp156.2.6.3
Ubuntu:18.04:LTS cockpit 0 No fix
Ubuntu:20.04:LTS cockpit 0 No fix
Ubuntu:22.04:LTS cockpit 0 No fix
Ubuntu:24.04:LTS cockpit 0 No fix
Ubuntu:24.10 cockpit 0 No fix
Ubuntu:Pro:18.04:LTS cockpit 0 No fix
Ubuntu:Pro:20.04:LTS cockpit 0 No fix
openSUSE:Leap 15.6 cockpit 0 320-bp156.2.6.3
openSUSE:Tumbleweed cockpit 0 320-1.1

Related vulnerabilities