Re: [PATCH] pidfd: restrict pidfd_getfd() to the caller's pid namespace

From: Christian Brauner

Date: Fri Nov 20 2026 - 07:48:08 EST


On Wed, 18 Nov 2026 00:23:32 +0900, Jiwoo Kim wrote:
> pidfds can cross pid namespace boundaries: a task can obtain one for a
> process outside of its own pid namespace hierarchy through SO_PASSPIDFD
> or SO_PEERPIDFD, via SCM_RIGHTS, or through file descriptor
> inheritance.
>
> Commit ee8323fdc827 ("pidfd: restrict task access ioctls to the caller's
> pid namespace") made the pidfs namespace ioctls fail with -EREMOTE
> unless the target is visible in the caller's active pid namespace, as
> PIDFD_GET_INFO already does, following the rule that operations which
> grant access to additional resources of the target require this [1].
>
> [...]

Seems fine.

---

Applied to the vfs-7.5.pidfd branch of the vfs/vfs.git tree.
Patches in the vfs-7.5.pidfd branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.5.pidfd

[1/1] pidfd: restrict pidfd_getfd() to the caller's pid namespace
https://git.kernel.org/vfs/vfs/c/0a5864ad213c