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: <CAEfhGiz+gD+Lxdetbwxpxv=U9R5sfA0oR5+pgoEdHtWfojj2MA@mail.gmail.com>
Date:	Tue, 19 Jan 2016 12:15:28 -0500
From:	Craig Gallek <kraigatgoog@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Dmitry Vyukov <dvyukov@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] udp: fix potential infinite loop in SO_REUSEPORT logic

On Tue, Jan 19, 2016 at 11:36 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Using a combination of connected and un-connected sockets, Dmitry
> was able to trigger soft lockups with his fuzzer.
>
> The problem is that sockets in the SO_REUSEPORT array might have
> different scores.
>
> Right after sk2=socket(), setsockopt(sk2,...,SO_REUSEPORT, on) and
> bind(sk2, ...), but _before_ the connect(sk2) is done, sk2 is added into
> the soreuseport array, with a score which is smaller than the score of
> first socket sk1 found in hash table (I am speaking of the regular UDP
> hash table), if sk1 had the connect() done, giving a +8 to its score.
>
> hash bucket [X] -> sk1 -> sk2 -> NULL
>
> sk1 score = 14  (because it did a connect())
> sk2 score = 6
>
> SO_REUSEPORT fast selection is an optimization. If it turns out the
> score of the selected socket does not match score of first socket, just
> fallback to old SO_REUSEPORT logic instead of trying to be too smart.
>
> Normal SO_REUSEPORT users do not mix different kind of sockets, as this
> mechanism is used for load balance traffic.
>
> Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection")
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Craig Gallek <kraigatgoog@...il.com>

Thanks Eric!

Acked-by: Craig Gallek <kraig@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ