CVE-2022-28657
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Jun 4, 2024
CISA due date
—
Cloudanix analysis
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
- Obtain local shell access as a non-root user
- Prepare a malicious Python crash payload or signal handler
- Force a crash inside an apport-managed chroot context
- Exploit the still-active Python handler to run code outside the chroot
- 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
- CVE-2022-28656 is_closing_session() allows users to consume RAM in the Apport process Also affects apport
- CVE-2022-28658 Apport argument parsing mishandles filename splitting on older kernels resulting in… Also affects apport
- CVE-2022-28652 ~/.config/apport/settings parsing is vulnerable to "billion laughs" attack Also affects apport
- CVE-2022-28655 is_closing_session() allows users to create arbitrary tcp dbus connections Also affects apport
- CVE-2022-28654 is_closing_session() allows users to fill up apport.log Also affects apport
- CVE-2022-1242 Apport can be tricked into connecting to arbitrary sockets as the root user Also affects apport
- CVE-2021-3899 There is a race condition in the 'replaced executable' detection that, with the correct… Also affects apport
- CVE-2021-3709 Function check_attachment_for_errors() in file data/general-hooks/ubuntu.py could be… Also affects apport