]> git.ipfire.org Git - thirdparty/openvpn.git/commit
On signal reception, return EAI_SYSTEM from openvpn_getaddrinfo().
authorGert Doering <gert@greenie.muc.de>
Sun, 31 May 2015 20:41:58 +0000 (22:41 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 1 Jun 2015 14:52:19 +0000 (16:52 +0200)
commit5f6c01ea6172ed1d8ed04e31f9f6c3f8e4696109
tree511bf587541717cd22da108472338cde4cf04f34
parent7d30696ac51aa9649f2290ada2c0fb5865cfe859
On signal reception, return EAI_SYSTEM from openvpn_getaddrinfo().

A signal (except SIGUSR1) received while waiting for getaddrinfo() is
considered fatal, so openvpn_getaddrinfo() is destroying the returned
information with freeaddrinfo(), but still signalled "success" (0)
to the caller - so if the caller accessed *res before checking
*signal_received, it would access just-free()ed memory, which on some
platforms still worked and on others caused a crash.

Also, ensure that *ai is also NULLed in the caller now.

Trac #276

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1433104918-9523-1-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9764
src/openvpn/socket.c