CVE-2018-6552
High · 7.8CVSS
7.8
EPSS
0.4%
Published
May 31, 2018
CISA due date
—
Cloudanix analysis
A bug in the Ubuntu crash reporter lets a program running inside a container trick the system into creating files as the all-powerful administrator account, which could let an attacker take over the whole computer or stop it from working.
- 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
The is_same_ns() check and subsequent forwarding logic in apport incorrectly substitute a container PID for the host_pid when the global /proc entry is absent, allowing a local process to cause apport to write or truncate arbitrary files as root in the host namespace.
Why it matters to the business
Attackers on a shared system or inside a container can exhaust disk or inode resources, obtain root privileges on the host, or break out of container isolation, leading to full system compromise or widespread service disruption.
How an attack unfolds
An attacker running inside a PID namespace triggers a crash that apport is configured to handle, then abuses the PID substitution flaw so that apport performs privileged file operations on the host rather than inside the container, resulting in root-owned files or resource exhaustion.
How to fix it
Upgrade apport to a version containing the corrected namespace handling logic; on Ubuntu systems apply the vendor-supplied package updates that address the PID substitution error.
How to confirm the fix worked
Confirm the installed apport package version is newer than the affected ranges listed in the advisory and test that crashes originating from a PID namespace are correctly forwarded using the host PID.
Typical attack path
- Obtain a shell or process inside a container or unprivileged PID namespace
- Force a crash of a process whose core dump is handled by apport
- Trigger the flawed namespace check that fails to replace sys.argv[1] with host_pid
- Cause apport to create, truncate, or write files as root on the host filesystem
- Leverage the resulting files for DoS, privilege escalation, or container escape
How to detect it
Examine apport logs and /var/log/syslog for entries showing crashes processed with mismatched PID namespaces; look for sudden creation of root-owned files in crash directories or unusual resource exhaustion patterns on hosts running containers.
What your security team should do
- Prioritize patching apport on all Ubuntu systems that still run the vulnerable versions
- Review container runtime configurations to ensure crash handlers cannot write to host paths
- Monitor for unexpected root-owned files appearing in /var/crash or other apport directories
The record
Apport does not properly handle crashes originating from a PID namespace allowing local users to create certain files as root which an attacker could leverage to perform a denial of service via resource exhaustion, possibly gain root privileges, or escape from containers. The is_same_ns() function returns True when /proc/<global pid>/ does not exist in order to indicate that the crash should be handled in the global namespace rather than inside of a container. However, the portion of the data/apport code that decides whether or not to forward a crash to a container does not always replace sys.argv[1] with the value stored in the host_pid variable when /proc/<global pid>/ does not exist which results in the container pid being used in the global namespace. This flaw affects versions 2.20.8-0ubuntu4 through 2.20.9-0ubuntu7, 2.20.7-0ubuntu3.7, 2.20.7-0ubuntu3.8, 2.20.1-0ubuntu2.15 through 2.20.1-0ubuntu2.17, and 2.14.1-0ubuntu3.28.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:14.04:LTS | apport | 0 | 2.14.1-0ubuntu3.29 |
| Ubuntu:16.04:LTS | apport | 0 | 2.20.1-0ubuntu2.18 |
| Ubuntu:18.04:LTS | apport | 0 | 2.20.9-0ubuntu7.1 |
Related vulnerabilities
- CVE-2021-25682 It was discovered that the get_pid_info() function in data/apport did not properly parse… Also affects apport
- CVE-2020-11936 gdbus setgid privilege escalation Also affects apport
- CVE-2020-8831 Apport creates a world writable lock file with root ownership in the world writable… Also affects apport
- CVE-2019-11481 Kevin Backhouse discovered that apport would read a user-supplied configuration file with… Also affects apport
- CVE-2019-7307 Apport before versions 2.14.1-0ubuntu3.29+esm1, 2.20.1-0ubuntu2.19, 2.20.9-0ubuntu7.7… Also affects apport
- CVE-2015-1341 Any Python module in sys.path can be imported if the command line of the process… Also affects apport
- CVE-2017-14177 Apport through 2.20.7 does not properly handle core dumps from setuid binaries allowing… Also affects apport
- CVE-2015-1324 Apport before 2.17.2-0ubuntu1.1 as packaged in Ubuntu 15.04, before 2.14.70ubuntu8.5 as… Also affects apport