From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Potapenko <glider@google.com>
Cc: dvyukov@google.com, kcc@google.com, edumazet@google.com,
davem@davemloft.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check()
Date: Mon, 17 Jul 2017 00:39:05 -0700 [thread overview]
Message-ID: <1500277145.5566.7.camel@edumazet-glaptop3.roam.corp.google.com> (raw)
In-Reply-To: <20170714165453.112098-1-glider@google.com>
On Fri, 2017-07-14 at 18:54 +0200, Alexander Potapenko wrote:
> KMSAN reported use of uninitialized memory in skb_set_hash_from_sk(),
> which originated from the TCP request socket created in
> cookie_v6_check():
> ==================================================================
>
> Signed-off-by: Alexander Potapenko <glider@google.com>
> ---
> net/ipv6/syncookies.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
> index 7b75b0620730..b4b354502c6e 100644
> --- a/net/ipv6/syncookies.c
> +++ b/net/ipv6/syncookies.c
> @@ -216,6 +216,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
> treq->rcv_isn = ntohl(th->seq) - 1;
> treq->snt_isn = cookie;
> treq->ts_off = 0;
> + treq->txhash = 0;
>
> /*
> * We need to lookup the dst_entry to get the correct window size.
Please use net_tx_rndhash() instead of 0, thanks.
( And same fix is needed for IPv4, as Neal mentioned already )
next prev parent reply other threads:[~2017-07-17 7:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 16:54 Alexander Potapenko
2017-07-14 17:04 ` Neal Cardwell
2017-07-14 17:35 ` Alexander Potapenko
2017-07-14 19:05 ` Neal Cardwell
2017-07-17 7:39 ` Eric Dumazet [this message]
2017-07-17 7:51 ` Eric Dumazet
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=1500277145.5566.7.camel@edumazet-glaptop3.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=edumazet@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®