On Mon, Jun 02, 2025 at 02:13:35PM +0200, Christian Brauner wrote: > On Mon, Jun 02, 2025 at 02:06:55PM +0200, Greg Kroah-Hartman wrote: > > On Mon, Jun 02, 2025 at 01:45:02PM +0200, Christian Brauner wrote: > > > On Mon, Jun 02, 2025 at 11:32:44AM +0200, Greg Kroah-Hartman wrote: > > > > On Mon, Jun 02, 2025 at 11:09:05AM +0200, Christian Brauner wrote: > > > > > On Fri, May 30, 2025 at 10:44:16AM +0100, Luca Boccassi wrote: > > > > > > Dear stable maintainer(s), > > > > > > > > > > > > The following series was merged for 6.16: > > > > > > > > > > > > https://lore.kernel.org/all/20250414-work-coredump-v2-0-685bf231f828@xxxxxxxxxx/ > > > > > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c57f07b235871c9e5bffaccd458dca2d9a62b164 > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=95c5f43181fe9c1b5e5a4bd3281c857a5259991f > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b5325b2a270fcaf7b2a9a0f23d422ca8a5a8bdea > > > > > > > > > > > > This allows the userspace coredump handler to get a PIDFD referencing > > > > > > the crashed process. > > > > > > > > > > > > We have discovered that there are real world exploits that can be used > > > > > > to trick coredump handling userspace software to act on foreign > > > > > > processes due to PID reuse attacks: > > > > > > > > > > > > https://security-tracker.debian.org/tracker/CVE-2025-4598 > > > > > > > > > > > > We have fixed the worst case scenario, but to really and > > > > > > comprehensively fix the whole problem we need this new %F option. We > > > > > > have backported the userspace side to the systemd stable branch. Would > > > > > > it be possible to backport the above 3 patches to at least the 6.12 > > > > > > series, so that the next Debian stable can be fully covered? The first > > > > > > two are small bug fixes so it would be good to have them, and the > > > > > > third one is quite small and unless explicitly configured in the > > > > > > core_pattern, it will be inert, so risk should be low. > > > > > > > > > > I agree that we should try and backport this if Greg agrees we can do > > > > > this. v6.15 will be easy to do. Further back might need some custom work > > > > > though. Let's see what Greg thinks. > > > > > > > > Yes, seems like a good thing to backport to at least 6.12.y if possible. > > > > > > > > Is it just the above 3 commits? > > > > > > Yes, just those three: > > > > > > b5325b2a270f ("coredump: hand a pidfd to the usermode coredump helper") > > > 95c5f43181fe ("coredump: fix error handling for replace_fd()") > > > c57f07b23587 ("pidfs: move O_RDWR into pidfs_alloc_file()") > > > > > > That should apply cleanly to v6.15 but for the others it requires custom > > > backports. So here are a couple of trees all based on linux-*.*.y from > > > the stable repo. You might need to adjust to your stable commit message > > > format though: > > > > > > v6.12: > > > https://github.com/brauner/linux-stable/tree/vfs-6.12.coredump.pidfd > > > > So that would be: > > git pull https://github.com/brauner/linux-stable.git vfs-6.12.coredump.pidfd > > ? > > > > Can I get a signed tag so I know that I can trust a github.com account? > > Sure, give me a minute. v6.12 ===== The following changes since commit df3f6d10f353de274cc7c87f52dba5d26f185393: Linux 6.12.31 (2025-05-29 11:03:27 +0200) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-6.12.stable.coredump.pidfd for you to fetch changes up to d4b6fd4951d0c73c0ab1a900d924959eec81d542: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:16:49 +0200) ---------------------------------------------------------------- vfs-6.12.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (2): coredump: fix error handling for replace_fd() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ include/linux/coredump.h | 1 + 2 files changed, 60 insertions(+), 6 deletions(-) v6.6 ==== The following changes since commit ffaf6178137b9cdcc9742d6677b70be164dfeb8c: Linux 6.6.92 (2025-05-22 14:12:26 +0200) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-6.6.stable.coredump.pidfd for you to fetch changes up to 05d1f1d0c42b0d5ecdffbaa986d053f9024b6b19: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:17:54 +0200) ---------------------------------------------------------------- vfs-6.6.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (2): coredump: fix error handling for replace_fd() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- include/linux/coredump.h | 1 + 2 files changed, 76 insertions(+), 6 deletions(-) v6.1 ==== The following changes since commit da3c5173c55f7a0cf65c967d864386c79dcba3f7: Linux 6.1.140 (2025-05-22 14:10:11 +0200) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-6.1.stable.coredump.pidfd for you to fetch changes up to 9c3383683cf521ac19f2d6a1f0001020cbdef5ea: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:19:57 +0200) ---------------------------------------------------------------- vfs-6.1.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (4): coredump: fix error handling for replace_fd() pid: add pidfd_prepare() fork: use pidfd_prepare() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++---- include/linux/coredump.h | 1 + include/linux/pid.h | 1 + kernel/fork.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- kernel/pid.c | 19 +++++-------- 5 files changed, 171 insertions(+), 29 deletions(-) v5.14 ===== The following changes since commit 545728d9e08593767dd55192b0324dd4f9b71151: Linux 5.14.21 (2021-11-21 13:49:09 +0100) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-5.14.stable.coredump.pidfd for you to fetch changes up to 2ffdb0f69836082c1ef8a1736df5ab68da56a1c7: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:21:43 +0200) ---------------------------------------------------------------- vfs-5.14.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (4): coredump: fix error handling for replace_fd() pid: add pidfd_prepare() fork: use pidfd_prepare() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++---- include/linux/binfmts.h | 1 + include/linux/pid.h | 1 + kernel/fork.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 163 insertions(+), 17 deletions(-) v5.10 ===== The following changes since commit 024a4a45fdf87218e3c0925475b05a27bcea103f: Linux 5.10.237 (2025-05-02 07:41:22 +0200) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-5.10.stable.coredump.pidfd for you to fetch changes up to 7cbb4d10e81aeefe15fd9fea6723d331156f64d0: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:22:31 +0200) ---------------------------------------------------------------- vfs-5.10.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (4): coredump: fix error handling for replace_fd() pid: add pidfd_prepare() fork: use pidfd_prepare() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++---- include/linux/binfmts.h | 1 + include/linux/pid.h | 1 + kernel/fork.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 164 insertions(+), 17 deletions(-) v5.4 ==== The following changes since commit 2c8115e4757809ffd537ed9108da115026d3581f: Linux 5.4.293 (2025-05-02 07:39:30 +0200) are available in the Git repository at: git@xxxxxxxxxx:brauner/linux-stable.git tags/vfs-5.4.stable.coredump.pidfd for you to fetch changes up to b8e412e55db1729d182a471fb83273bbcbd18325: coredump: hand a pidfd to the usermode coredump helper (2025-06-02 14:23:49 +0200) ---------------------------------------------------------------- vfs-5.4.stable.coredump.pidfd ---------------------------------------------------------------- Christian Brauner (5): coredump: fix error handling for replace_fd() pidfd: check pid has attached task in fdinfo pid: add pidfd_prepare() fork: use pidfd_prepare() coredump: hand a pidfd to the usermode coredump helper fs/coredump.c | 80 ++++++++++++++++++++++++++++++++++++++++++---- include/linux/binfmts.h | 1 + include/linux/pid.h | 5 +++ kernel/fork.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 175 insertions(+), 19 deletions(-)