[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171205.180726.1564033390463106515.davem@davemloft.net>
Date: Tue, 05 Dec 2017 18:07:26 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: kraigatgoog@...il.com, edumazet@...gle.com, glider@...gle.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net] net: remove hlist_nulls_add_tail_rcu()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 05 Dec 2017 12:45:56 -0800
> From: Eric Dumazet <edumazet@...gle.com>
>
> Alexander Potapenko reported use of uninitialized memory [1]
>
> This happens when inserting a request socket into TCP ehash,
> in __sk_nulls_add_node_rcu(), since sk_reuseport is not initialized.
>
> Bug was added by commit d894ba18d4e4 ("soreuseport: fix ordering for
> mixed v4/v6 sockets")
>
> Note that d296ba60d8e2 ("soreuseport: Resolve merge conflict for v4/v6
> ordering fix") missed the opportunity to get rid of
> hlist_nulls_add_tail_rcu() :
>
> Both UDP sockets and TCP/DCCP listeners no longer use
> __sk_nulls_add_node_rcu() for their hash insertion.
>
> Since all other sockets have unique 4-tuple, the reuseport status
> has no special meaning, so we can always use hlist_nulls_add_head_rcu()
> for them and save few cycles/instructions.
>
> [1]
...
> Fixes: d894ba18d4e4 ("soreuseport: fix ordering for mixed v4/v6 sockets")
> Fixes: d296ba60d8e2 ("soreuseport: Resolve merge conflict for v4/v6 ordering fix")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Alexander Potapenko <glider@...gle.com>
> Acked-by: Craig Gallek <kraig@...gle.com>
I was just talking with Craig and Willem about this change the other
day, what a coincidence :-)
Applied and queued up for -stable, thanks Eric.
Powered by blists - more mailing lists