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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251028-work-coredump-signal-v1-4-ca449b7b7aa0@kernel.org>
Date: Tue, 28 Oct 2025 09:45:49 +0100
From: Christian Brauner <brauner@...nel.org>
To: linux-fsdevel@...r.kernel.org
Cc: Oleg Nesterov <oleg@...hat.com>, Amir Goldstein <amir73il@...il.com>, 
 Aleksa Sarai <cyphar@...har.com>, 
 Yu Watanabe <watanabe.yu+github@...il.com>, 
 Josef Bacik <josef@...icpanda.com>, Jeff Layton <jlayton@...nel.org>, 
 Jann Horn <jannh@...gle.com>, Luca Boccassi <luca.boccassi@...il.com>, 
 Alexander Mikhalitsyn <alexander@...alicyn.com>, 
 linux-kernel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>, 
 Jan Kara <jack@...e.cz>, Lennart Poettering <lennart@...ttering.net>, 
 Mike Yuan <me@...dnzj.com>, 
 Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>, 
 Christian Brauner <brauner@...nel.org>
Subject: [PATCH 04/22] pidfs: add missing BUILD_BUG_ON() assert on struct
 pidfd_info

Validate that the size of struct pidfd_info is correctly updated.

Fixes: 1d8db6fd698d ("pidfs, coredump: add PIDFD_INFO_COREDUMP")
Signed-off-by: Christian Brauner <brauner@...nel.org>
---
 fs/pidfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/pidfs.c b/fs/pidfs.c
index c0f410903c3f..7e4d90cc74ff 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -306,6 +306,8 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
 	const struct cred *c;
 	__u64 mask;
 
+	BUILD_BUG_ON(sizeof(struct pidfd_info) != PIDFD_INFO_SIZE_VER1);
+
 	if (!uinfo)
 		return -EINVAL;
 	if (usize < PIDFD_INFO_SIZE_VER0)

-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ