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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114025007.99331-1-kuniyu@amazon.com>
Date: Wed, 13 Nov 2024 18:50:07 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <stsp2@...dex.ru>
CC: <almasrymina@...gle.com>, <asml.silence@...il.com>, <axboe@...nel.dk>,
	<brauner@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<gouhao@...ontech.com>, <horms@...nel.org>, <kees@...nel.org>,
	<krisman@...e.de>, <kuba@...nel.org>, <kuniyu@...zon.com>,
	<linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>,
	<mhal@...x.co>, <netdev@...r.kernel.org>, <oleg@...hat.com>,
	<pabeni@...hat.com>, <quic_abchauha@...cinc.com>, <shuah@...nel.org>,
	<tandersen@...flix.com>, <viro@...iv.linux.org.uk>, <willemb@...gle.com>
Subject: Re: [PATCH] net/unix: pass pidfd flags via SCM_PIDFD cmsg

From: Stas Sergeev <stsp2@...dex.ru>
Date: Thu, 14 Nov 2024 00:02:05 +0300
> @@ -154,7 +157,12 @@ static __inline__ void scm_pidfd_recv(struct msghdr *msg, struct scm_cookie *scm
>  	if (!scm->pid)
>  		return;
>  
> -	pidfd = pidfd_prepare(scm->pid, 0, &pidfd_file);
> +	err = pidfd_validate_flags(scm->pidfd_flags);

No neede to double check here, it's already checked in __scm_send().


> +	if (err) {
> +		msg->msg_flags |= MSG_CTRUNC;
> +		return;
> +	}
> +	pidfd = pidfd_prepare(scm->pid, scm->pidfd_flags, &pidfd_file);
>  
>  	if (put_cmsg(msg, SOL_SOCKET, SCM_PIDFD, sizeof(int), &pidfd)) {
>  		if (pidfd_file) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ