CVE-2021-3899
NoneCVSS
—
EPSS
0.4%
Published
Jun 3, 2024
CISA due date
—
Cloudanix analysis
A timing flaw in program update checks could let a local attacker run damaging code with complete system control.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Race Condition
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in replaced executable detection logic allows a local attacker with appropriate configuration to inject and execute arbitrary code with root privileges.
Why it matters to the business
Local attackers can gain full administrative control over affected systems, enabling data theft, persistence, or disruption of critical services.
How an attack unfolds
An attacker with local access configures the environment to trigger executable replacement detection, then wins the race window to substitute malicious code that executes as root.
How to fix it
Apply vendor patches that eliminate the race condition in replaced executable detection; review and harden local configuration settings that enable the feature.
How to confirm the fix worked
Confirm systems are running patched versions; audit configurations for the replaced executable detection feature and test for race condition exposure in controlled environments.
Typical attack path
- Obtain local access to a system with the vulnerable configuration enabled
- Prepare a malicious executable and trigger the replacement detection path
- Exploit the timing window to replace the detected executable
- Execute the injected code with elevated root privileges
How to detect it
Review system logs for anomalous executable replacement events, unexpected root-owned processes, and timing anomalies around file modification operations.
What your security team should do
- Apply available patches immediately on all affected systems
- Disable or restrict the replaced executable detection feature where possible
- Enforce least-privilege execution and monitor for unexpected root process spawns
The record
There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.
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-28657 Apport does not disable python crash handler before entering chroot Also affects apport
- 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-3709 Function check_attachment_for_errors() in file data/general-hooks/ubuntu.py could be… Also affects apport