Live data from Hacker News

Important security vulnerabilities in OpenVPN

guidovranken.wordpress.com

81–90 of 97 posts

Re: Important security vulnerabilities in OpenVPN

#81

I was thinking of switching to L2TP instead. Would there be any downsides? I tried out this script once and it worked well: https://github.com/hwdsl2/setup-ipsec-vpn

L2TP doesn't traverse NATs and other network firewalls very well. Which isn't relevant if you yourself control all of the hardware between endpoints (e.g. point2point) but if you plan on using it on public networks (e.g. Starbucks WiFi) then expect to run into it being blocked sometimes. OpenVPN was designed for the "Starbucks WiFi" scenario, it can traverse a NAT, and uses standard TLS. It therefore appears like any…

Where does this idea that OpenVPN is TLS come from? No, it does not appear like HTTPS nor does it use TLS for the traffic.

OpenVPN has its completely own encapsulation protocol, and it stuffs a few TLS packets inside that to do key exchange, nothing more. (And it's key exchange is odd as they re-implement TLS PRF ... on top of TLS.)

t. Recently implemented an OpenVPN client.

Re: Important security vulnerabilities in OpenVPN

#82

Earlier quoted context omitted.

L2TP doesn't traverse NATs and other network firewalls very well. Which isn't relevant if you yourself control all of the hardware between endpoints (e.g. point2point) but if you plan on using it on public networks (e.g. Starbucks WiFi) then expect to run into it being blocked sometimes. OpenVPN was designed for the "Starbucks WiFi" scenario, it can traverse a NAT, and uses standard TLS. It therefore appears like any…

Where does this idea that OpenVPN is TLS come from? No, it does not appear like HTTPS nor does it use TLS for the traffic. OpenVPN has its completely own encapsulation protocol, and it stuffs a few TLS packets inside that to do key exchange, nothing more. (And it's key exchange is odd as they re-implement TLS PRF ... on top of TLS.) t. Recently implemented an OpenVPN client.

The man page says it supports TLS

Re: Important security vulnerabilities in OpenVPN

#83
post #78

It's good to see that 2 donations, totaling 0.80260293 BTC (~2000 euro) are made to Guido's wallet [0]. Probably not worth his time, but since he states it was "a labor of love" it's still a nice extra! Edit: corrected BTC amount. [0] https://blockchain.info/address/1D5vYkiLwRptKP1LCnt4V1TPUgk7...

Private Internet Access VPN provided $1,000 of that and thanks OP profusely [0].

[0] https://www.privateinternetaccess.com/forum/discussion/24191...

Re: Important security vulnerabilities in OpenVPN

#84
post #82

Earlier quoted context omitted.

Where does this idea that OpenVPN is TLS come from? No, it does not appear like HTTPS nor does it use TLS for the traffic. OpenVPN has its completely own encapsulation protocol, and it stuffs a few TLS packets inside that to do key exchange, nothing more. (And it's key exchange is odd as they re-implement TLS PRF ... on top of TLS.) t. Recently implemented an OpenVPN client.

The man page says it supports TLS

It supports TLS as an optional key-exchange payload, nothing more. It does not act in any way like "SSL VPNs" that just open a TLS connection and then tunnel data inside.

Re: Important security vulnerabilities in OpenVPN

#85
post #43

Earlier quoted context omitted.

The fun part is that a somewhat premium (read: more bandwidth) VPN option will cost around the same as a lower tier VPS. So, if you're willing to put up with the 10-15 commands, editing a couple configuration files, and copying config and cert files over, you can get your own VPN and a Linux server to use.

Yup. Most VPNs with decent bandwith cost $4/month. You can get pretty much the same service for $4/year if you buy a cheap NAT VPS server and spend 10 minutes setting up openvpn.

Could you point me towards a $4/Year VPS ? Would gladly buy it.

Re: Important security vulnerabilities in OpenVPN

#86
post #53

Earlier quoted context omitted.

Over the past years Apache httpd has had 187 vulnerabilities, 24 of which had potential remote code execution consequences. I'm not saying anyone is ever going to find another RCE in Apache. I'll even go as far as to say it's not very likely. But I don't think develop a server and then put it in the world's most hostile environments for 20 years until we're certain it's safe is a particularily efficient development s…

>People should stop building stuff in C, it's that simple. I would attenuate this in one sense and amplify it in another: it's (almost always) irresponsible to write network-facing code in C.

Which is why although I dislike some decisions regarding Go's type system, I advocate its use by devops and UNIX userspace apps, the less C the better, regardless if Go has or not generics.

Re: Important security vulnerabilities in OpenVPN

#88
post #36
post #18

Vulnerability #2 is a good example of why OpenSSL is a minefield even for a competent coder. For such a security-critical library it's pretty insane that the API is so unfriendly, bordering on hostile. > The correct way to do this is to call GENERAL_NAMES_free. This is because sk_GENERAL_NAME_free frees only the containing structure, whereas GENERAL_NAMES_free frees the structure AND its items. And later: > Here, the…

> you have to quadruple check each function invocation with the docs to make sure you got it right. If the docs contain that information ¯\_(ツ)_/¯

Ow. The memories.

Back in 2004 I was writing a piece of networking code that had to do handshakes with parameters that were not exposed in OpenSSL API. After many days of code diving and mailing list digging, I came across an old thread.

Some kind soul had written up the man pages for the family of low-level functions I needed to use. He sent the doc update as a patch to the mailing list, and the response from the devs has seared itself to my memory: "NAK. If you use these functions, you need to understand all the code around them anyway."

That day I learned everything I needed to know about OpenSSL and its development.

Re: Important security vulnerabilities in OpenVPN

#89
post #76
post #59

OpenVPN is very complicated and for that reason I use sshuttle[1] which is very simple. It does require that you own an sshd running on an endpoint somewhere (like a VPS or an EC2 instance or your own server somewhere) - but if you can clear that hurdle, you end up with a very elegant and simple solution. [1] https://github.com/sshuttle/sshuttle

For Mac users, Sidestep [1] offers a similar VPN over SSH experience. It's the only VPN product I've ever used that I've never had an issue with...it just works (no doubt due to the bulletproof nature of SSH). [1] http://chetansurpur.com/projects/sidestep/

This interested me however it appears to be abandoned ... last commit was on 2013-10-25 and comments like the one at the end of this comment thread:

https://github.com/chetan51/sidestep/issues/62

indicate that it is abandoned ...

Re: Important security vulnerabilities in OpenVPN

#90
post #79

Earlier quoted context omitted.

Indeed, wireguard looks like it's going to be the bee's knees. It still has a lot of development ahead of it, though.

Shouldn't take too long, though. It's still about 10kSLoC and it's been more/less feature frozen for over a year. I get the feeling that it's already probably safer than most deployed VPN systems. Most of the recent work seems to be forward porting, reworking the ratelimiter, and tweaks to the treatment of randomness.

If by 10kLoC you actually mean less than 4kLoC, then I agree with you. :)
Post reply on HN