CVE-2022-28658
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
Jun 4, 2024
CISA due date
—
Cloudanix analysis
A bug in how file names are split when processing arguments on older systems can let someone on the same machine trick the program into using the wrong inputs.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Apport argument parsing mishandles filename splitting on older kernels resulting in argument spoofing
Why it matters to the business
Local users may be able to influence process arguments in crash reporting flows, potentially bypassing intended security controls on systems running older kernels; the large number of downstream GitLab dependents increases exposure surface across development pipelines.
How an attack unfolds
An attacker on a local system crafts a filename containing special characters that Apport's parser splits incorrectly on older kernels, causing spoofed arguments to be passed to handlers and enabling unauthorized actions without elevated privileges.
How to fix it
Upgrade gitlab-org/gitlab to commit 67af793e55bd098111d3c3e265cd2c92eb283f1c or later; apply kernel updates where feasible and review argument handling in related components.
How to confirm the fix worked
Confirm the deployed GitLab version includes commit 67af793e55bd098111d3c3e265cd2c92eb283f1c; test argument parsing with crafted filenames on representative older kernels.
Typical attack path
- Identify a system running an older kernel with Apport enabled
- Create a maliciously named file or trigger a crash report
- Exploit the filename splitting flaw to inject spoofed arguments
- Achieve argument spoofing to alter expected behavior
How to detect it
Search system and application logs for unusual argument patterns or filenames containing delimiters around crash report events; review process execution traces for unexpected argument values.
What your security team should do
- Prioritize upgrade of all GitLab instances to the fixed commit within the next patching cycle
- Monitor for local privilege or argument manipulation attempts in crash reporting paths
- Review dependencies on Apport or similar argument parsers for similar issues
The record
Apport argument parsing mishandles filename splitting on older kernels resulting in argument spoofing
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-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