]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fixed port-share bug with DoS potential
authorJames Yonan <james@openvpn.net>
Thu, 3 Mar 2016 07:48:12 +0000 (00:48 -0700)
committerGert Doering <gert@greenie.muc.de>
Mon, 9 May 2016 19:00:38 +0000 (21:00 +0200)
commit9030fd4cc6283e30f927f950310fc0f83edb5e4d
tree8407ec1359db4e6881925a770d760b5d2d278ca4
parentb15d511aa6ca75c643a46b703b5536016a77d395
Fixed port-share bug with DoS potential

Fixed port-share bug that can cause segfault when the number
of concurrent connections is large.

The issue is that the port-share code calls openvpn_connect()
which in turn calls select().  When there are a high number
of concurrent port-share connections, the fd passed to select
can potentially exceed FD_SETSIZE, causing undefined behavior.

The fix is to use poll() (if available) instead of select().

Signed-off-by: James Yonan <james@openvpn.net>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAA1Abx+2E2FZN-y6P=mkKpSuZ7bOV5m6rUMTx3V7UP2qPMjZPg@mail.gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11626
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 007738e9d6030c8989713543e4f7308ff57be30f)
src/openvpn/socket.c