lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250604-umtreiben-pulle-3a0f7ffb961b@brauner>
Date: Wed,  4 Jun 2025 22:50:29 +0200
From: Christian Brauner <brauner@...nel.org>
To: linux-fsdevel@...r.kernel.org,
	Mike Yuan <me@...dnzj.com>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-kernel@...r.kernel.org,
	Luca Boccassi <luca.boccassi@...il.com>,
	stable@...r.kernel.org
Subject: Re: [PATCH] pidfs: never refuse ppid == 0 in PIDFD_GET_INFO

On Wed, 04 Jun 2025 15:03:42 +0000, Mike Yuan wrote:
> In systemd we spotted an issue after switching to ioctl(PIDFD_GET_INFO)
> for obtaining pid number the pidfd refers to, that for processes
> with a parent from outer pidns PIDFD_GET_INFO unexpectedly yields
> -ESRCH [1]. It turned out that there's an arbitrary check blocking
> this, which is not really sensible given getppid() happily returns
> 0 for such processes. Just drop the spurious check and userspace
> ought to handle ppid == 0 properly everywhere.
> 
> [...]

The original motivation has likely been to exclude calling
PIDFD_GET_INFO for kthreads. But it's questionable whether that's a
sensible restriction given that we allow to retrieve information about
kthreads via /proc/<pid>/status already.

---

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes 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.fixes

[1/1] pidfs: never refuse ppid == 0 in PIDFD_GET_INFO
      https://git.kernel.org/vfs/vfs/c/b55eb6eb2a74

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ