Cloudanix VulnDB

CVE-2022-28657

High · 7.8

CVSS

7.8

EPSS

0.2%

Published

Jun 4, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux crash-reporting tool on Ubuntu could let someone already on the computer gain full control of the machine.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Apport fails to disable the Python crash handler prior to entering a chroot, allowing a crafted crash report or signal to execute Python code outside the restricted environment and escalate privileges.

Why it matters to the business

Local users can obtain root-level access on affected Ubuntu systems, leading to full system compromise, data theft, or persistence; the issue has low public exploit activity but remains relevant on unpatched long-lived Ubuntu deployments.

How an attack unfolds

An attacker with local low-privileged access triggers an apport-handled Python crash inside a chroot environment; because the crash handler remains active, malicious Python code supplied via the crash report executes with elevated privileges outside the chroot, achieving privilege escalation.

How to fix it

Upgrade apport to a patched release that disables the Python crash handler before any chroot operation; apply all subsequent Ubuntu security updates that address this class of handler leakage.

How to confirm the fix worked

Confirm the installed apport version contains the fix that explicitly disables sys.excepthook and faulthandler before chroot; review source for the disablement call and test that crashes inside chroot no longer execute external handlers.

Typical attack path

  1. Obtain local shell access as a non-root user
  2. Prepare a malicious Python crash payload or signal handler
  3. Force a crash inside an apport-managed chroot context
  4. Exploit the still-active Python handler to run code outside the chroot
  5. Escalate to root and establish persistence or exfiltrate data

How to detect it

Search system logs and apport crash directories for unexpected Python executions or handler registrations around the time of crashes; review process trees for python processes started by apport outside expected chroot boundaries.

What your security team should do

  • Patch all Ubuntu systems running apport to the latest available security release
  • Audit local user accounts and remove unnecessary privileges that could reach apport
  • Monitor for unexpected Python processes spawned from apport or crash directories
  • Restrict chroot usage to trusted code paths where possible

The record

Apport does not disable python crash handler before entering chroot

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:18.04:LTS apport 0 2.20.9-0ubuntu7.28
Ubuntu:20.04:LTS apport 0 2.20.11-0ubuntu27.24
Ubuntu:22.04:LTS apport 0 2.20.11-0ubuntu82.1
Ubuntu:Pro:14.04:LTS apport 0 No fix
Ubuntu:Pro:16.04:LTS apport 0 2.20.1-0ubuntu2.30+esm4

Related vulnerabilities