TCP support is broken in 2.3.0
Hi everyone,
About two weeks ago I created ticket # 263 regarding a possible bug in OpenVPN 2.3.0. The ticket seems to have received little attention albeit being somewhat serious.
The bug is easy to reproduce and the ticket contains information on how to do so. In short, clients get disconnected if the server attempts to send data in a faster rate than the network can handle. This only happens if TCP is used. I have verified this behaviour on several platforms with both precompiled packages and compiled from scratch.
I'd be grateful if someone could verify this behaviour and maybe start investigating why it is happening.
Best regards,
Peter Caprioli
PATCH 1/1 Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
From: Gert Doering <[email protected]...>
Return value of mbuf_len() wrong - it's returning a length value, not a yes/no value - so when the queue length approached 65 (full!), it still only returned "1", leading to MBUF overflow later on. Change from "bool" to "int", misbehaviour gone...
--- src/openvpn/mbuf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
src/openvpn/mbuf.h +1 -1
@@ -83,7 +83,7 @@ mbuf_defined (const struct mbuf_set *ms)return ms && ms->len; } -static inline bool +static inline int mbuf_len (const struct mbuf_set *ms) {return ms->len;
Signature · 1 line
1.7.8.6
Re: [Openvpn-devel] [PATCH] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Quoted 8 lines · On 11.03.2013 21:10, [email protected]... wrote:
From: Gert Doering <[email protected]...>
Return value of
mbuf_len()wrong - it's returning a length value, not a yes/no value - so when the queue length approached 65 (full!), it still only returned "1", leading to MBUF overflow later on. Change from "bool" to "int", misbehaviour gone...
ACK. I did not check if that fixes the issue but the change is correct.
Arne
Re: [Openvpn-devel] [PATCH] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Hi,
Shouldn't the return type be size_t or at least unsigned int, as mbuf->len is also of type unsigned int?
-Steffan
-----Original Message-----
From: Arne Schwabe [mailto:[email protected]...]
Sent: maandag 11 maart 2013 22:35
To: [email protected]...; [email protected]
Subject: Re: [Openvpn-devel] [PATCH] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Quoted 8 lines · On 11.03.2013 21:10, [email protected]... wrote:
From: Gert Doering <[email protected]...>
Return value of
mbuf_len()wrong - it's returning a length value, not a yes/no value - so when the queue length approached 65 (full!), it still only returned "1", leading to MBUF overflow later on. Change from "bool" to "int", misbehaviour gone...
ACK. I did not check if that fixes the issue but the change is correct.
Arne
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH v2] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Hi,
Quoted 1 line · Steffan Karger
Shouldn't the return type be
size_tor at least unsigned int, asmbuf->lenis also of type unsigned int?
Well, unsigned int, as ->len is not a size_t.
Not that it makes any real difference as we're talking about a range between "0" and "65" here. But anyway. Patch v2 is below.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...From b6add3999621825420f7e56e4c7790dc30a68ffe Mon Sep 17 00:00:00 2001
From: Gert Doering <[email protected]...>
Date: Mon, 11 Mar 2013 21:03:20 +0100
Subject: [PATCH v2] Repair "tcp server queue overflow" brokenness, more
<stdbool.h> fallout.
Return value of mbuf_len() wrong - it's returning a length value, not a yes/no value - so when the queue length approached 65 (full!), it still only returned "1", leading to MBUF overflow later on. Change from "bool" to "unsigned int", misbehaviour gone...
--- src/openvpn/mbuf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
src/openvpn/mbuf.h +1 -1
@@ -83,7 +83,7 @@ mbuf_defined (const struct mbuf_set *ms)return ms && ms->len; } -static inline bool +static inline unsigned int mbuf_len (const struct mbuf_set *ms) {return ms->len;
Signature · 1 line
1.7.8.6
Re: [Openvpn-devel] [PATCH v2] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 12.03.13 11:07, schrieb Gert Doering:
Quoted 4 lines
Hi,
Quoted 1 line · Steffan Karger
Shouldn't the return type be
size_tor at least unsigned int, as
mbuf->len is also of type unsigned int?
Quoted 6 lines
Well, unsigned int, as ->len is not a
size_t.Not that it makes any real difference as we're talking about a range between "0" and "65" here. But anyway. Patch v2 is below.
ACK to that too.
Arne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlE/AhkACgkQe8+cMNS4zRfErwCcDvRSIfQ22qAT8C/PsNlaScUV L0YAoITnJqqV/D4HeLZFaXMf+B7k+ceG
=FIBk
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH v2] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
In reply to Gert DoeringI'll ACK the bool -> int patch, it resolves the issue in ticket 263.
________________________________________
Från: Gert Doering [[email protected]...]
Skickat: den 12 mars 2013 11:07
Till: Steffan Karger
Cc: [email protected]
Ämne: Re: [Openvpn-devel] [PATCH v2] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Hi,
Quoted 1 line · Steffan Karger
Shouldn't the return type be
size_tor at least unsigned int, asmbuf->lenis also of type unsigned int?
Well, unsigned int, as ->len is not a size_t.
Not that it makes any real difference as we're talking about a range between "0" and "65" here. But anyway. Patch v2 is below.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...
Re: [Openvpn-devel] [PATCH v2] Repair "tcp server queue overflow" brokenness, more <stdbool.h> fallout.
Hi,
Quoted 1 line · Peter Caprioli
I'll ACK the bool -> int patch, it resolves the issue in ticket 263.
Thanks for bisecting this, and for verifying that the patch indeed fixes the original problem (besides being "obviously correct" :) ).
Committed and pushed to master and release/2.3 branch.
commit 0eb398501fab9c016b9b6008682c43873c4a6188 (master) commit 80b4b1e740de60a7f94132ac4bebcd9474fbe182 (release/2.3)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...