[Openvpn-devel] why so big default mtu size?

2012-03-07 Thread Sergey Matveychuk

Hello.

I did not set any mtu* options and get that:
Control Channel MTU parms [ L:1589 D:166 EF:66 EB:0 ET:0 EL:0 ]
Data Channel MTU parms [ L:1589 D:1450 EF:57 EB:4 ET:32 EL:0 ]
Local Options String: 'V4,dev-type tap,link-mtu 1589,tun-mtu 1532,proto 
UDPv4,cipher AES-128-CBC,auth SHA1,keysize 128,tls-auth,key-method 
2,tls-server'


It looks bad.
Looking in code I see default tun-mtu is 1500, tun-mtu-extra is 32 and 
link-mtu is tun-mtu+all overhead. Could you explain it please?




Re: [Openvpn-devel] 2.3alpha1 fails on OS X when the --up argument contains more than an execution path

2012-03-07 Thread David Sommerseth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/03/12 13:48, Jonathan K. Bullard wrote:
[...skip...]
> 
> *Details *
> 
> OpenVPN 2.3alpha1 fails when the argument to "--up" contains more
> than an execution path. The problem also occurs for the "--down"
> option and the new "--route-pre-down" option (and presumably any other
> options that take more than just an execution path).
> 
> OpenVPN 2.2.1 and earlier work fine with an identical command line.
> 
> This happens on OS X; I don't know about other platforms but I assume
>  option processing is not very platform specific.
> 
> 2.3alpha1 is apparently treating the entire argument that follows 
> "--up" as the path for a file to execute, instead of treating it as a 
> shell command consisting of a path optionally followed by arguments.
> 
> On 2.3alpha1:
> 
> test jkb$ *openvpn-2.3-alpha1/openvpn --config 
> /private/tmp/test/config.ovpn  --up "/private/tmp/test/up.sh -x"* 
> Options error: --up script fails with '/private/tmp/test/up.sh  -x': 
> No such file or directory Options error: Please correct these errors.
>  Use --help for more information.

Ouch!  I see that check_file_access() needs to strip out any arguments.
It will now basically 'access("/private/tmp/test/up.sh -x")' ... which is
a file which doesn't exist ... but if it tested for
'access("/private/tmp/test/up.sh")' it should find the file.

However, it isn't as easy to just skip through the string and "terminate
it" on the first space (0x20) value, as it might have been escaped.
Which can make quite typical paths like this fail:

   "C:\Program Files\OpenVPN\bin\up-script.bat"

I got my plate very full right now, so if you or someone else have time
to poke at this, that'd be great.


kind regards,

David Sommerseth
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9XbDkACgkQDC186MBRfrp1NgCeO7CLBygxocRknDbrYMNl3lg4
nnMAn0nSnMVMGTcSDDttD8zOp5JDhnX/
=rgox
-END PGP SIGNATURE-



[Openvpn-devel] 2.3alpha1 fails on OS X when the --up argument contains more than an execution path

2012-03-07 Thread Jonathan K. Bullard
I'm the developer for Tunnelblick (open source GUI for OS X), having taken
over from Angelo Laub a couple of years ago. I'd like to make a beta of
Tunnelblick with OpenVPN 2.3alpha1 available for testing, but the alpha has
a bug that makes it useless for most users of Tunnelblick. Lots of people
use Tunnelblick betas, so it would be a good way to get 2.3alpha1 into the
hands of a lot of people -- there were more than 30,000 downloads of the
last beta in the ten days it was available. (Users can easily switch back
to using OpenVPN 2.2.1 with two clicks in the Tunnelblick GUI, so there's
not much downside for them to try it.

Almost all Tunnelblick users use the standard Tunnelblick up/down scripts,
which fail on 2.3alpha1. I don't want to provide a beta of Tunnelblick that
includes OpenVPN 2.3alpha1 if it will only work for a small percentage of
users.

I don't know OpenVPN well enough to work on this, so Samuli Seppänen
suggested that I email to this mailing list. Could one of you developers
provide a patch to 2.3alpha1 that fixes it? I would rather not wait until
alpha2 to start testing.


*Details
*

OpenVPN 2.3alpha1 fails when the argument to "--up" contains more than an
execution path. The problem also occurs for the "--down" option and the new
"--route-pre-down" option (and presumably any other options that take more
than just an execution path).

OpenVPN 2.2.1 and earlier work fine with an identical command line.

This happens on OS X; I don't know about other platforms but I assume
option processing is not very platform specific.

2.3alpha1 is apparently treating the entire argument that follows "--up" as
the path for a file to execute, instead of treating it as a shell command
consisting of a path optionally followed by arguments.

On 2.3alpha1:

 test jkb$ *openvpn-2.3-alpha1/openvpn --config
/private/tmp/test/config.ovpn  --up "/private/tmp/test/up.sh  -x"*
 Options error: --up script fails with '/private/tmp/test/up.sh  -x':
No such file or directory
 Options error: Please correct these errors.
 Use --help for more information.

But on 2.2.1:
 test jkb$ *openvpn-2.2.1/openvpn --config
/private/tmp/test/config.ovpn --up "/private/tmp/test/up.sh  -x"*
 Wed Mar  7 07:30:33 2012 OpenVPN 2.2.1 i386-apple-darwin10.8.0 [SSL]
[LZO2] [PKCS11] [eurephia] built on Mar  1 2012
 Enter Auth Username:
 Wed Mar  7 07:30:46 2012 ERROR: Auth username is empty
 Wed Mar  7 07:30:46 2012 Exiting

And
 test jkb$ *openvpn-2.3-alpha1/openvpn --config
/private/tmp/test/config.ovpn  --up "/private/tmp/test/up.sh"*
 Wed Mar  7 07:35:56 2012 OpenVPN 2.3-alpha1 i386-apple-darwin10.8.0
[SSL (OpenSSL)] [LZO2] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110522-1
(2.2.0)] built on Mar  1 2012
 Enter Auth Username:
 Wed Mar  7 07:35:59 2012 ERROR: Auth username is empty
 Wed Mar  7 07:35:59 2012 Exiting due to fatal error

Notes:

   1. The above commands are simplified to show the problem. They won't
   actually work for making a connection.
   2. The double-quotes in the above command lines are used so bash will
   create single arguments that contain spaces. When starting OpenVPN,
   Tunnelblick uses an OS X interface that provides the arguments as separate
   items, so they don't need to be enclosed in quotes. The actual argument
   that OpenVPN is passed will contain quotes if the path contains spaces.

If the path contains spaces, OpenVPN will be passed


 "/private/tmp/test path with spaces/up.sh"  -x

If the path does not contain spaces, OpenVPN will be passed

 /private/tmp/test/up.sh -x


I'd appreciate any help on this that I can get.

Thanks,

Jon Bullard


Re: [Openvpn-devel] OpenVPN Management Interface

2012-03-07 Thread michael-dev

Hi,

On Wed, 07 Mar 2012 09:00:04 +1300, Jason Haar wrote:

Your comments on rogue servers is certainly worth discussing too.
What can a rogue openvpn server push back to a client? Routes 
obviously - but

other than screwing the client, is there any new risk?


if you expect the server to be rouge, openvpn client has to be careful 
with input data validation - for example when running an ifconfig, you 
could try some injection into the run commands. (Or within the up/down 
scripts.)
If you don't expect the server to be rouge, SSL on client side would 
prevent most attacks.


As far as I can see, push/pull is already limited for security reasons.

Regards,
 M. Braun