From: Kees Cook <kees@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
David Ahern <dsahern@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Joe Damato <jdamato@fastly.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] net: core: dev.c confirmed to use classic sockaddr
Date: Tue, 17 Dec 2024 12:30:36 -0800 [thread overview]
Message-ID: <202412171230.824B83D@keescook> (raw)
In-Reply-To: <67619a5029d2c_a046929426@willemb.c.googlers.com.notmuch>
On Tue, Dec 17, 2024 at 10:35:44AM -0500, Willem de Bruijn wrote:
> Kees Cook wrote:
> > As part of trying to clean up struct sock_addr, add comments about the
> > sockaddr arguments of dev_[gs]et_mac_address() being actual classic "max
> > 14 bytes in sa_data" sockaddr instances and not struct sockaddr_storage.
>
> What is this assertion based on?
>
> I see various non-Ethernet .ndo_set_mac_address implementations, which
> dev_set_mac_address calls. And dev_set_mac_addr_user is called from
> rtnetlink do_setlink. Which kmalloc's sa based on dev->addr_len.
Yeah, I was clearly missing several cases. Please ignore this patch. I
will re-examine this.
--
Kees Cook
next prev parent reply other threads:[~2024-12-17 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 1:24 [PATCH] net: core: dev.c confirmed to use classic sockaddr Kees Cook
2024-12-17 15:35 ` Willem de Bruijn
2024-12-17 20:30 ` Kees Cook [this message]
2024-12-18 5:58 ` Kees Cook
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=202412171230.824B83D@keescook \
--to=kees@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).