From: Kees Cook <kees@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Kees Cook <keescook@chromium.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Breno Leitao <leitao@debian.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org, syzkaller <syzkaller@googlegroups.com>
Subject: RE: [PATCH v1 net 1/2] af_unix: Fix fortify_panic() in unix_bind_bsd().
Date: Wed, 19 Jul 2023 15:34:33 -0700 [thread overview]
Message-ID: <3DADE655-EE51-4DB0-8CEC-C3791AB12129@kernel.org> (raw)
In-Reply-To: <64b8631b8f1b0_286a73294cc@willemb.c.googlers.com.notmuch>
On July 19, 2023 3:26:35 PM PDT, Willem de Bruijn <willemdebruijn.kernel@gmail.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.
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
-Kees
--
Kees Cook
next prev parent reply other threads:[~2023-07-19 22:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 18:53 [PATCH v1 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3 Kuniyuki Iwashima
2023-07-19 18:53 ` [PATCH v1 net 1/2] af_unix: Fix fortify_panic() in unix_bind_bsd() Kuniyuki Iwashima
2023-07-19 22:26 ` Willem de Bruijn
2023-07-19 22:34 ` Kees Cook [this message]
2023-07-19 23:15 ` Kuniyuki Iwashima
2023-07-19 18:53 ` [PATCH v1 net 2/2] af_packet: Fix warning of fortified memcpy() in packet_getname() Kuniyuki Iwashima
2023-07-19 21:08 ` Kuniyuki Iwashima
2023-07-19 21:15 ` Willem de Bruijn
2023-07-19 21:27 ` Kuniyuki Iwashima
2023-07-19 21:34 ` Willem de Bruijn
2023-07-19 21:38 ` David Laight
2023-07-19 21:39 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DADE655-EE51-4DB0-8CEC-C3791AB12129@kernel.org \
--to=kees@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavoars@kernel.org \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@amazon.com \
--cc=leitao@debian.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzkaller@googlegroups.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).