CVE-2026-89766: pidfd: hold exec_update_lock around namespace ioctl
In the Linux kernel, the following vulnerability has been resolved:
pidfd: hold execupdatelock around namespace ioctl
The PIDFDGETNAMESPACE ioctls in pidfdioctl() perform a filesystem credentials ptrace access check before handing out a namespace file descriptor. The accompanying comment states that the code "mirrors nsfs behavior", but, unlike the corresponding procfs paths, it does so without holding the target task's execupdatelock.
procnsgetlink() and procnsreadlink() both take execupdatelock for reading around the ptrace check and the namespace lookup, so that the credentials used for the access decision match those of the task when its namespace is read. Without it, a caller can pass the check against the target's old credentials and then read the namespace after the target has execve()'d a setuid binary and committed new credentials -- accessing namespace information it should have been denied.
Hold execupdatelock for reading around the ptrace check and the namespace lookup so that pidfd truly mirrors nsfs behavior, as the comment already claims. opennamespace() itself runs outside the lock: once a namespace reference is obtained it carries its own refcount and is opened with the caller's own credentials, so a concurrent execve() on the target can no longer affect the outcome.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In pidfd_ioctl(), hold the target task's exec_update_lock for reading around the ptrace access check and namespace lookup for the PIDFD_GET_*_NAMESPACE ioctls, matching proc_ns_get_link() and proc_ns_readlink() behavior.
Event History
Frequently Asked Questions
What conditions are required to exploit this issue?
An attacker needs a pidfd for a target task and must invoke a PIDFD_GET_*_NAMESPACE ioctl while the target transitions through execve() of a setuid binary. The access check must succeed using the target's old credentials before the ioctl obtains namespace information under the new credentials.
Which systems or workloads are realistically exposed?
Exposure is limited to Linux kernel users of the PIDFD_GET_*_NAMESPACE ioctls where a target process can exec a setuid binary. The issue is a race between the ptrace-style filesystem credential check and the target's credential and namespace state during execve().
What is the impact of winning the race?
The caller can obtain namespace information after the target has committed credentials that should have caused access to be denied. This can disclose namespace information that the caller would not otherwise be permitted to read.