CVE-2026-143175: pidfd: restrict task access ioctls to the caller's pid namespace
In the Linux kernel, the following vulnerability has been resolved:
pidfd: restrict task access ioctls to the caller's pid namespace
pidfds can cross pid namespace boundaries: a task may obtain one for a process outside of its own pid namespace hierarchy through SOPASSPIDFD or SOPEERPIDFD, via SCMRIGHTS, or through file descriptor inheritance.
The namespace ioctls gate access with a ptrace check against the target's credentials only. That check does not account for the pid namespace relationship between the caller and the target, so a task inside a pid namespace can use a pidfd obtained across that boundary to acquire namespace file descriptors of a task outside of its hierarchy.
procfs exposes the equivalent information only for tasks visible in the reader's pid namespace, and PIDFDGETINFO already answers with -EREMOTE for targets outside the caller's hierarchy. Extend that policy to the namespace ioctls: fail with -EREMOTE unless the target is visible in the caller's active pid namespace. Callers in ancestor pid namespaces are unaffected.
Unlike PIDFDGETINFO, the visibility check is performed after the task lookup here, so reaped targets outside of the caller's pid namespace hierarchy answer -ESRCH instead of -EREMOTE.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which environments are exposed to this issue?
Tasks running in a PID namespace are exposed if they can obtain a pidfd for a process outside their PID namespace hierarchy. The described paths include SO_PASSPIDFD or SO_PEERPIDFD, SCM_RIGHTS descriptor passing, and inherited file descriptors.
What does an attacker need to exploit it?
An attacker needs a cross-namespace pidfd and must be able to pass the existing ptrace-based access check against the target's credentials. They can then use the pidfd namespace ioctls to obtain namespace file descriptors for a target outside their hierarchy.
Are callers in ancestor PID namespaces affected?
No. The fix preserves access for callers in ancestor PID namespaces; it rejects namespace ioctl requests with -EREMOTE only when the target is not visible in the caller's active PID namespace.
What is the expected behavior after applying the fix?
Namespace ioctls on pidfds now enforce PID-namespace visibility in addition to the existing checks. Requests for targets outside the caller's PID namespace hierarchy fail with -EREMOTE.