Description
Race condition in Canonical apport up to and including 2.32.0 allows a local attacker to leak sensitive information via PID-reuse by leveraging namespaces. When handling a crash, the function `_check_global_pid_and_forward`, which detects if the crashing process resided in a container, was being called before `consistency_checks`, which attempts to detect if the crashing process had been replaced. Because of this, if a process crashed and was quickly replaced with a containerized one, apport could be made to forward the core dump to the container, potentially leaking sensitive information. `consistency_checks` is now being called before `_check_global_pid_and_forward`. Additionally, given that the PID-reuse race condition cannot be reliably detected from userspace alone, crashes are only forwarded to containers if the kernel provided a pidfd, or if the crashing process was unprivileged (i.e., if dump mode == 1).
Problem types
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Product status
2.20.1 (dpkg) before 2.20.1-0ubuntu2.30+esm5
2.20.9 (dpkg) before 2.20.9-0ubuntu7.29+esm1
2.20.11 (dpkg) before 2.20.11-0ubuntu27.28
2.20.11 (dpkg) before 2.20.11-0ubuntu82.7
2.28.1 (dpkg) before 2.28.1-0ubuntu3.6
2.30.0 (dpkg) before 2.30.0-0ubuntu4.3
2.32.0 (dpkg) before 2.32.0-0ubuntu5.1
2.32.0 (dpkg) before 2.33.0-0ubuntu1
2.20 (semver)
Credits
Qualys Threat Research Unit (TRU)
References
seclists.org/fulldisclosure/2025/Jun/9
ubuntu.com/security/notices/USN-7545-1
ubuntu.com/security/CVE-2025-5054
www.qualys.com/.../05/29/apport-coredump/apport-coredump.txt