lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1500277145.5566.7.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Mon, 17 Jul 2017 00:39:05 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Alexander Potapenko <glider@...gle.com>
Cc:     dvyukov@...gle.com, kcc@...gle.com, edumazet@...gle.com,
        davem@...emloft.net, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: initialize treq->txhash in cookie_v6_check()

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@...gle.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 )



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ