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: <dc97cb0e-628c-4a97-98ca-06ececf32e1e@samba.org>
Date: Tue, 25 Nov 2025 13:36:26 +0100
From: Stefan Metzmacher <metze@...ba.org>
To: Gabriel Krisman Bertazi <krisman@...e.de>, Jens Axboe <axboe@...nel.dk>
Cc: netdev@...r.kernel.org, io-uring@...r.kernel.org,
 Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Kuniyuki Iwashima <kuniyu@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Willem de Bruijn <willemb@...gle.com>,
 Simon Horman <horms@...nel.org>
Subject: Re: [PATCH v3 3/3] io_uring: Introduce getsockname io_uring cmd

Hi Gabriel,

> +static int io_uring_cmd_getsockname(struct socket *sock,
> +				    struct io_uring_cmd *cmd,
> +				    unsigned int issue_flags)
> +{
> +	const struct io_uring_sqe *sqe = cmd->sqe;
> +	struct sockaddr __user *uaddr;
> +	unsigned int peer;
> +	int __user *ulen;
> +
> +	if (sqe->ioprio || sqe->__pad1 || sqe->len || sqe->rw_flags)
> +		return -EINVAL;
> +
> +	uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
> +	ulen = u64_to_user_ptr(sqe->addr3);
> +	peer = READ_ONCE(sqe->optlen);
> +	if (peer > 1)
> +		return -EINVAL;
> +	return do_getsockname(sock, 0, uaddr, ulen);

I guess this should actually pass down 'peer' instead of '0'?

metze

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ