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: <20241105171607.48c0c24d@kernel.org>
Date: Tue, 5 Nov 2024 17:16:07 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
 linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
 linux-hardening@...r.kernel.org
Subject: Re: [PATCH RFC 0/5] sockaddr usage removal

On Mon,  4 Nov 2024 14:25:02 -0800 Kees Cook wrote:
> I think for getname() (and similar interfaces) we *do* want to use
> sockaddr_storage, but there is kind of an argument to instead use
> a struct with a flexible array, e.g.:
> 
> struct sockaddr_unspec {
>         sa_family_t	sa_family;
> 	char		sa_data[];
> };
> 
> If this was done, then all these APIs would switch their casts from
> "(struct sockaddr *)" to "(struct sockaddr_unspec *)", even though in
> most cases the object is actully a struct sockaddr_storage.

struct sockaddr_unspec was my knee-jerk reaction but looking at the code
- indeed passing struct sockaddr_storage seems cleaner.

> What do folks think?

Looks nice, and feels like the right direction :)

FWIW if the conversion work is too tedious I think I can find some
people that could help.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ