Thread (8 messages) flat view 8 messages, 7 authors, 2023-09-09

Re: [PATCH net-next] net: Fix incorrect address comparison when searching for a bind2 bucket

From: Eric Dumazet <edumazet@google.com>
Date: 2022-09-28 05:07:24

On Tue, Sep 27, 2022 at 9:46 PM Martin KaFai Lau [off-list ref] wrote:
On 9/27/22 8:49 PM, Eric Dumazet wrote:
quoted
On Mon, Sep 26, 2022 at 5:25 PM Martin KaFai Lau [off-list ref] wrote:
quoted
From: Martin KaFai Lau <martin.lau@kernel.org>

The v6_rcv_saddr and rcv_saddr are inside a union in the
'struct inet_bind2_bucket'.  When searching a bucket by following the
bhash2 hashtable chain, eg. inet_bind2_bucket_match, it is only using
the sk->sk_family and there is no way to check if the inet_bind2_bucket
has a v6 or v4 address in the union.  This leads to an uninit-value
KMSAN report in [0] and also potentially incorrect matches.
I do not see the KMSAN report, is it missing from this changelog ?
My bad. Forgot to paste the link in the commit message.  It is here:

https://lore.kernel.org/netdev/CAG_fn=Ud3zSW7AZWXc+asfMhZVL5ETnvuY44Pmyv4NPv-ijN-A@mail.gmail.com/ (local)
I see, thanks.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help