Hi,

On Mon, Oct 18, 2010 at 06:41:39PM +0200, Alberto Gonzalez Iniesta wrote:
> It's not a bug in the Windows implementation but in OpenVPN 2.1.3
> itself. The bug is reported and it is being worked in.
> I think you're using 'remote_host' on your client configuration (or
> pushing it from the server). If that's the case, try changing that with
> the IP of the VPN server and see if that fixes it in the meantime.

Indeed.  *sigh*.  For "special case" routes, the change introduced in 2.1.3
to handle routes to multiple targets wrecks things in interesting ways.

If I read the code right, init_route() will leave &netlist untouched for
get_special_addr() routes ("remote_host" 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.

I think the patch below should fix this, but have not tested this at all
(neither with nor without the patch).  Applies to tag v2.1.3

I'd appreciate if someone could verify my analysis and ACK or NAK :-)

gert

----------------------------------------------------------

From c23a8a15566851fd88f5712dfe5ae881bba2b240 Mon Sep 17 00:00:00 2001
From: Gert Doering <g...@greenie.muc.de>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Wed, 20 Oct 2010 21:27:14 +0200
Subject: [PATCH] Fix problem with special case route targets ('remote_host')

Signed-off-by: Gert Doering <g...@greenie.muc.de>
---
 route.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/route.c b/route.c
index 5d8f8d6..d50821e 100644
--- a/route.c
+++ b/route.c
@@ -450,6 +450,8 @@ init_route_list (struct route_list *rl,
        struct route r;
        int k;
 
+        netlist.len = 0;               /* won't be set for special routes */
+
        if (!init_route (&r,
                         &netlist,
                         &opt->routes[i],
-- 
1.7.0.5


-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: pgp2D6TyZYj_U.pgp
Description: PGP signature

Reply via email to