174 points · by Foxboron · 6y ago · 41 comments
Maybe I don't understand the issue to be solved (I was unfamiliar with the 'road warrior' term so I looked it up [1]), but I think both Avery Pennarun and Michael Tremer misunderstood what WireGuard is capable of. WireGuard works just fine when the physical network interfaces have dynamic IPs (on both ends even). You can use the basic wg or wg-quick tools to create a VPN server on a server with a dynamic IP and have clients connect from dynamic IPs. However, all the tunnel IPs must be static unlike e.g. OpenVPN where the server gives the client a tunnel IP during authentication.
> (for example, so you can get to an office network whose home connection uses dynamic DNS). It’s true that plain WireGuard does not support this configuration out of the box.
I have done literally that for over a year now. I cannot think of a way to interpret this that would make Avery's claims true.
> Someday, WireGuard will need to be upgraded to support a second cipher suite. When this happens, users will be able to configure it peer-by-peer to allow one cipher suite or the other, or both, exactly as they would with any other VPN.
That is not how I interpret what Donenfeld has said [2] about the future of WireGuard. I believe the software will get a v2 without backwards compatibility. However, even that is a non-issue because sysadmins can run both protocols in parallel during the transition.
[1] https://en.wikipedia.org/wiki/Road_warrior_%28computing%29
[2] Page 3 of https://www.wireguard.com/papers/wireguard.pdf
If holes are found in the underlying primitives,
all endpoints will be required to update.
Unlike IP packets, struct message_header doesn't even have a version number. I suppose type could be used for that since it's 32b.An interesting question is how will this play out with Wireguard going into the Linux kernel itself.
I'm not a kernel dev, but WireGuard v2 will probably be implemented as a separate kernel module so they can coexist. It makes sense to do it that way since they're practically entirely separate protocols.
This is the thing I'm afraid of. It's noble to have a lean protocol but leaving things like this to be externalized is just going to create a mess of incompatible middleware when there could have been a "blessed" solution.
The author of the original article seems to be making the following assumptions:
- "Secure" is only about what protocols you support, and not about the quality of implementation, whether the protocols are implemented accurately, etc. In the author's world, Heartbleed (which was introduced as part of DTLS, part of Cisco's VPN implementation) doesn't exist, the Pulse Secure vulnerability that left Travelex completely non-operational doesn't exist, etc.
- That said, "3DES with MD5" is a good cryptographic protocol to use, and you should avoid fancier things like "AES-256 with SHA1."
- You should only consider using black boxes from companies like Cisco and Juniper (authors of Pulse Secure). If it's not compatible with those appliances, it's not worth using.
- You can't ever upgrade software in a reliable fashion. Everyone is running old, unpatched versions of software, and it's better for that unpatched software with all the well-known zero-days to connect to your corporate network than to be blocked from connecting.
- You should directly connect your internal network to "third parties that you do not control," and you should let those third parties dictate your software choices instead of vice versa.
In this world, you have nothing other than constant disasters. I guess it's good for job security, especially for someone whose job is professional support for IPsec.
It's a shame it needed debunking, but I'm glad someone did.
Having compatibility with the major vendors in the space is a real advantage because it’s a de facto standard I can get other companies and partners to agree on because they’re probably running one of those black boxes. You don’t have actually use any of them, but you will get a call down the road to interface with one of them.
I think the main thing is that WireGuard is a beautiful clean protocol that is about to get buried under piles of shoddy middleware to deal with the messy real world.
Otherwise, what's your plan for a Heartbleed-style scenario? Wait months for everyone to upgrade?
That said, the fatal flaw of Wireguard is the crypto model. Nobody who interacts with the US government, regulated US industries, or some F500 will be able to use it because of the fixed algorithm choice, which isn’t possibly FIPS 140-2 validatable. You’ll always need that Cisco/Pulse/whatever box.
That may be a feature for some, but it kneecaps the possibility of it being as ubiquitous as it might be otherwise.
(a) Using FIPS cryptography, which is inferior, to placate the USG.
(b) Using best-practices cryptography, and being incompatible with some places that mandate FIPS.
(c) Supporting both FIPS and non-FIPS cryptography, which creates handshake bugs and gives you lowest-common-denominator security.
I think you can reasonable argue that (a) and (b) are both superior to (c); I think WireGuard made the right choice here.
In the long run, for enterprise environments, I don't think this much matters. Even with FIPS cryptography, stodgy enterprises won't adopt WireGuard until it becomes so prevalent elsewhere that they have to, simply because IPSEC has more standardization. So the WireGuard task is simply to make it so prevalent everywhere else that stodgy enterprises no long have a vote.
Like, I get that that is not likely to happen, but the resistance of the state to competence is not an excuse for resistance to it outside the state.
If I die from covid before I get it I'll be very upset.
Kidding (kind of)!
So it's not entirely impossible IPSec will eventually fade into obscurity.
Because, on your local network, you can run whatever you want (but it better be ipv6-aware software using DNS, it's easier to fool like NAT64 or yggdrasil do).
Basically I was left with the idea - how in the world is the gigantic set of interlocking RFCs (at least to me IPv6 seems to involve a lot of complex stuff) the best way to network these days.
I don't think this is going to be as simple as the author thinks. Look at Git's migration away from SHA1. There was no designed mechanism for switching hash functions, and lots of code assumed 20-byte hashes. Three years after the first SHA1 collision was discovered, Git has not switched to a new hash function. I don't mean to be alarmist - no one has created a practical attack on Git objects, but the time to switch cryptographic primitives is when they start showing weakness, not after they are definitely broken.
IPSec has a standard method for supporting multiple cipher suites, and negotiating a common suite. It might be very complicated, but we have no way of comparing it to WireGuard, because WireGuard doesn't implement the same feature.
Hypothetical WireGuard v2 packets will simply not parse as WireGuard v1 packets; they can't be decrypted as WireGuard v1. And vice versa. It's therefore trivial to have both protocols coexist, even on the same UDP port, without any negotiation whatsoever. You simply need to discard packets that don't decrypt, which is what WireGuard already does.
It's dangerous to include a downgrade-capable negotiation in your VPN protocol. I'm glad they left that out of WireGuard.
If both ends will automatically fall back to v1, how do you prevent protocol downgrade attacks? An adversary dropping v2 packets looks exactly like the other end not supporting v2 packets.
>It's dangerous to include a downgrade-capable negotiation in your VPN protocol.
I agree. It's a hard problem to solve. But it's going to have to be solved eventually.
[Disclosure, I'm a Tailscale co-founder] ...and if you use Tailscale, it takes responsibility for the key exchange part. So we can tie protocol version settings to long-term state (eg. ratcheting up versions for each old node; not letting new nodes use old versions at all).
Regardless, I think cryptographic agility makes a lot more sense for a storage format like git than it does for a wire format. A shared repo being upgraded from gitv1 to an incompatible gitv2 would need everyone to switch versions at once. With WireGuard, a server could offer support for both v1 and v2 clients, then both v1 and v2 clients can connect to it at the same time, and clients can upgrade on their own schedule. The protocol doesn't have to make any special allowances, like making any data structures interpretable by both, besides to have both v1 and v2 on different ports or have different initial connection messages.
WireGuard was developed in response to protocols like IPSec, OpenVPN, and TLS, which emphasized configurability and cryptographic agility to a fault. Not only were they hard to use and easy to misconfigure, but each one of them were at times vulnerable to downgrade attacks because of subtle bugs in their ability to be configured. It's better to be able to have few code paths and verify they all work as expected, than it is to have many code paths, only verify the happy path, and hope that there's no way for users to fall down an unstudied insecure path by their own fault or because of attackers.