From: David Ahern <dsahern@kernel.org>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] ipv6: switch inet6_acaddr_hash() to less predictable hash
Date: Tue, 8 Oct 2024 08:40:31 -0600 [thread overview]
Message-ID: <fa6a9964-b8e0-4ecf-975e-04d8760db1de@kernel.org> (raw)
In-Reply-To: <20241008121307.800040-1-edumazet@google.com>
On 10/8/24 6:13 AM, Eric Dumazet wrote:
> commit 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable")
> added inet6_acaddr_hash(), using ipv6_addr_hash() and net_hash_mix()
> to get hash spreading for typical users.
>
> However ipv6_addr_hash() is highly predictable and a malicious user
> could abuse a specific hash bucket.
>
> Switch to __ipv6_addr_jhash(). We could use a dedicated
> secret, or reuse net_hash_mix() as I did in this patch.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> net/ipv6/anycast.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2024-10-08 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 12:13 [PATCH net-next] ipv6: switch inet6_acaddr_hash() to less predictable hash Eric Dumazet
2024-10-08 14:40 ` David Ahern [this message]
2024-10-08 16:23 ` Kuniyuki Iwashima
2024-10-10 2:50 ` patchwork-bot+netdevbpf
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=fa6a9964-b8e0-4ecf-975e-04d8760db1de@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).