0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 03:52:28 +02:00

Fix problem with special case route targets ('remote_host')

The init_route() function will leave &netlist untouched for
get_special_addr() routes ("remote_host" being one of them).
netlist is on stack,  contains random garbage, and netlist.len
will not be 0 - thus, random stack data is copied from
netlist.data[] until the route_list is full.

This issue has been reported several places lately:
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600166
   http://thread.gmane.org/gmane.network.openvpn.devel/4083
   https://forums.openvpn.net/viewtopic.php?f=1&t=7201&p=8168

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
This commit is contained in:
Gert Doering 2010-10-21 10:35:29 +02:00 committed by David Sommerseth
parent d6b783a8ec
commit 59afc4a5f7

View File

@ -450,6 +450,8 @@ init_route_list (struct route_list *rl,
struct route r;
int k;
CLEAR(netlist); /* init_route() will not always init this */
if (!init_route (&r,
&netlist,
&opt->routes[i],