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: <20230719231523.77224-1-kuniyu@amazon.com>
Date: Wed, 19 Jul 2023 16:15:23 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kees@...nel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <gustavoars@...nel.org>,
	<keescook@...omium.org>, <kuba@...nel.org>, <kuni1840@...il.com>,
	<kuniyu@...zon.com>, <leitao@...ian.org>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>, <syzkaller@...glegroups.com>,
	<willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH v1 net 1/2] af_unix: Fix fortify_panic() in unix_bind_bsd().

From: Kees Cook <kees@...nel.org>
Date: Wed, 19 Jul 2023 15:34:33 -0700
> On July 19, 2023 3:26:35 PM PDT, Willem de Bruijn <willemdebruijn.kernel@...il.com> wrote:
> >Kuniyuki Iwashima wrote:
> >The extensive comments are really helpful to understand what's
> >going on.
> >
> >An alternative would be to just cast sunaddr to a struct
> >sockaddr_storage *ss and use that both here and in unix_mkname_bsd?
> >It's not immediately trivial that the caller has always actually
> >allocated one of those. But the rest becomes self documenting.

Yeah, this is also my initial attempt, and I separted it because
unix_find_bsd() need not to call it and I tried to separate
unnecessary calls in this series (compilers might drop the unused
strlen() though).

https://lore.kernel.org/netdev/20211124021431.48956-7-kuniyu@amazon.co.jp/


> 
> I would much prefer the internal APIs actually passed around the true sockaddr_storage pointer. This is what I did recently for NFS, for example:
> https://git.kernel.org/linus/cf0d7e7f4520

We can convert struct proto_ops and struct proto later as such
if needed, but I think it's too invasive as a fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ