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: <202507241526.292798770A@keescook>
Date: Thu, 24 Jul 2025 15:28:02 -0700
From: Kees Cook <kees@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Kuniyuki Iwashima <kuniyu@...gle.com>,
	Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/6 net-next] net: uapi: Add __kernel_sockaddr_unspec for
 sockaddr of unknown length

On Thu, Jul 24, 2025 at 02:40:46PM -0700, Jakub Kicinski wrote:
> On Wed, 23 Jul 2025 16:19:08 -0700 Kees Cook wrote:
> > I added this to UAPI in the hopes that it could also be used for any
> > future "arbitrarily sized" sockaddr needs. But it may be better to
> > use a different UAPI with an explicit size member:
> > 
> > struct sockaddr_unspec {
> > 	u16 sa_data_len;
> > 	u16 sa_family;
> > 	u8  sa_data[] __counted_by(sa_data_len);
> > };
> 
> Right, not sure how likely we are to add completely new future APIs 
> that take sockaddr directly. Most new interfaces will be wrapped in
> Netlink. I may be missing the point but the need to add this struct
> in uAPI right now is not obvious to me.

Yeah, it was pure speculation on my part. I am perfectly happy keeping
it strictly internal to the kernel, but I thought I'd try to show some
possibilities.

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ