Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688736
| From | Eric Dumazet <eric.dumazet@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() |
| Date | 2017-07-17 10:00 +0200 |
| Message-ID | <u496G-29K-13@gated-at.bofh.it> (permalink) |
| References | <u3c6B-686-11@gated-at.bofh.it> <u48Nk-232-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2017-07-17 at 00:39 -0700, Eric Dumazet wrote:
> 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 )
Also please add the following tag.
Fixes: 58d607d3e52f ("tcp: provide skb->hash to synack packets")
Thanks again !
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Alexander Potapenko <glider@google.com> - 2017-07-14 19:00 +0200
Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Neal Cardwell <ncardwell@google.com> - 2017-07-14 19:10 +0200
Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Alexander Potapenko <glider@google.com> - 2017-07-14 19:40 +0200
Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Neal Cardwell <ncardwell@google.com> - 2017-07-14 21:10 +0200
Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Eric Dumazet <eric.dumazet@gmail.com> - 2017-07-17 09:40 +0200
Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check() Eric Dumazet <eric.dumazet@gmail.com> - 2017-07-17 10:00 +0200
csiph-web