LWN: Comments on "VPN hijacking on Linux (and beyond) systems" https://lwn.net/Articles/806546/ This is a special feed containing comments posted to the individual LWN article titled "VPN hijacking on Linux (and beyond) systems". en-us Wed, 01 Oct 2025 04:30:12 +0000 Wed, 01 Oct 2025 04:30:12 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806981/ https://lwn.net/Articles/806981/ Cyberax <div class="FormattedComment"> It's #2. The attacker won't be able to decrypt the packets, but they can (blindly)inject their code into a TCP stream.<br> </div> Tue, 10 Dec 2019 20:16:47 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806895/ https://lwn.net/Articles/806895/ jmclnx <div class="FormattedComment"> I am trying to understand the term "adjacent user".<br> <p> Does that mean:<br> 1. Another user on your local system ?<br> OR<br> 2. Someone on a different device connected to the same router as you are ?<br> <p> For # 2, I was under the impression the VPN encrypted on your local device, so I am not sure what would be seen except for your own IP (as others said). Which can be an issue for some folks.<br> <p> Thanks<br> John<br> </div> Tue, 10 Dec 2019 14:36:43 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806886/ https://lwn.net/Articles/806886/ nim-nim <div class="FormattedComment"> But, wouldn’t that break horribly in presence of virtual things (vm or containers) on the same host?<br> <p> All of those run firewalls.<br> <p> NFV means dedicated firewall hardware will eventually too<br> </div> Tue, 10 Dec 2019 11:10:01 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806850/ https://lwn.net/Articles/806850/ hmh <div class="FormattedComment"> Well, unicast reverse path filtering (uRPF) is geared towards no-config filtering of *source address spoofing* based on routing information. It was designed for hardware routers with extremely fast routing engines and far less capable packet filters, and where you care far more about packets that are just passing through.<br> <p> uRPF drops packets trying to come from an interface when the reverse path (the reply path, as defined by a destination route lookup on the *source* of the packet) would NOT go through that interface -- in strict mode. It costs one extra route lookup per packet.<br> <p> It is *NOT* the correct tool to address the weak host model. It will leave chinks in the armor, related to tricks with the destination addresses, and the way L2 and L3 addressing are independent in IP over ethernet. It might even twart this particular attack, but it will not in any way address the whole thing. You are strongly advised to fix the real problem, instead.<br> <p> On Linux, right now, this requires iptables/nftables, since one cannot tell the kernel to configure itself for the strong host model with a single knob. BTW, uRPF for IPv6 is only available through iptables/nftables...<br> <p> Oh, and one likely need to configure the damn ARP response and filtering behavior too, to keep L2 and L3 consistent.<br> <p> For a strong host model, you want the firewall to drop anything incoming from an interface (*other than lo*) that is destined to the local address of a different interface. Also, anything outgoing with a *local* source address that does not belong to that interface should be rejected (again, lo should be exempt if you don't want to go insane).<br> <p> Forwarding is easier to get right, and most stuff already does so... provided no local addresses are involved (see above).<br> </div> Mon, 09 Dec 2019 18:19:56 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806851/ https://lwn.net/Articles/806851/ Cyberax <div class="FormattedComment"> <font class="QuotedText">&gt; So you hijeck the TCP session, but what do you do with it?</font><br> Inject malicious JavaScript, for example. You do need plain HTTP for that, though.<br> </div> Mon, 09 Dec 2019 17:51:29 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806841/ https://lwn.net/Articles/806841/ Matlib Yes, I should have carefully read the whole report, which indeed only mentions injection (whether or not this is realistic over a real VPN connection with modern TCP/IP stack). I was misled by some news telling about some cathastrophic "connection hijacking in Linux", "all VPN vulnerable" etc. Mon, 09 Dec 2019 17:26:52 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806849/ https://lwn.net/Articles/806849/ ncultra <div class="FormattedComment"> Leaking IP addresses when (initializing or) using a VPN can be a serious issue for some VPN users; that is an important issue to discuss but not new. Hence Tor initializing the VPN connection in a different manner.<br> </div> Mon, 09 Dec 2019 17:12:33 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806835/ https://lwn.net/Articles/806835/ bahner <div class="FormattedComment"> I am so not getting this. I get that it's possible to infer ack and seq numbers and inject packages into the TCP stream, but is that more than a dos-attack? So you hijeck the TCP session, but what do you do with it?<br> You will still need the secrets to decrypt the VPN-traffic, right?<br> <p> So as I understand a potential nuisance, and leak off information in the form of IP-addresses. But you need access to the gateway/ access point in the local network of the client.<br> <p> So I see a problem that needs to fixed, but I can't see any real impact for this problem.<br> </div> Mon, 09 Dec 2019 16:18:07 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806834/ https://lwn.net/Articles/806834/ dskoll <p>It wasn't my intention to be dismissive or sarcastic. Really! It just seemed to me the announcement was a little bit breathless. <p>They have pointed out something useful, which is that Linux is a pain in the neck to configure to use the Strong Host Model. I would love to see a simple knob that lets you choose between Weak and Strong model, with Strong being the default. Mon, 09 Dec 2019 16:10:40 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806765/ https://lwn.net/Articles/806765/ ncultra <div class="FormattedComment"> If you pad the sequence packets its impossible for their method of guessing sequence numbers to work.<br> </div> Mon, 09 Dec 2019 13:12:24 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806754/ https://lwn.net/Articles/806754/ if.gnu.linux <div class="FormattedComment"> Hi all,<br> <p> I am a little confused about what to do to mitigate this vulnerability for a system which does not use VPN, because I am just an "average Joe" user. Is using "net.ipv*.conf.all.rp_filter=1" enough to mitigate it? Or, beside this kernel parameter, do I need to wait a kernel patch?<br> <p> P.S.: My native language is not English.<br> </div> Mon, 09 Dec 2019 09:23:51 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806727/ https://lwn.net/Articles/806727/ Cyberax <div class="FormattedComment"> <font class="QuotedText">&gt; It is not possible to take over a TCP connection from some other network using a different IP address.</font><br> It most certainly is possible, if you are able to somehow guess the sequence numbers (and a couple of other parameters). You will not _get_ the traffic that is intended for the true remote host, but you will be able to inject your own data.<br> <p> This is called the "Mitnick attack". <br> </div> Sun, 08 Dec 2019 18:40:09 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806728/ https://lwn.net/Articles/806728/ flussence <div class="FormattedComment"> Looks like OpenBSD fixed it already: <a href="https://marc.info/?l=openbsd-tech&amp;m=157580561114203&amp;w=2">https://marc.info/?l=openbsd-tech&amp;m=157580561114203&amp;...</a><br> </div> Sun, 08 Dec 2019 18:39:34 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806718/ https://lwn.net/Articles/806718/ Matlib It is not possible to take over a TCP connection from some other network using a different IP address. A VPN connection is just another network interface from the TCP/IP point of view. <br><br> It can be done using some sort of man-in-the-middle attack (including ARP cache poisoning), but this is not what he's trying to do here. Sun, 08 Dec 2019 12:55:38 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806715/ https://lwn.net/Articles/806715/ Cyberax <div class="FormattedComment"> You are way too dismissive. If you read the actual post, you'll find that they discovered a way to find out the sequence number and ports. This allows them to actually take over the connection, without bothering about the true remote host.<br> <p> This can be used, for example, to inject malicious JavaScript into unencrypted connections. <br> <p> Old-timers might remember this as "the Mitnick attack": <a href="http://wiki.cas.mcmaster.ca/index.php/The_Mitnick_attack">http://wiki.cas.mcmaster.ca/index.php/The_Mitnick_attack</a><br> </div> Sun, 08 Dec 2019 09:59:33 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806714/ https://lwn.net/Articles/806714/ tpo <div class="FormattedComment"> I think it's counterproductive to dismiss the OPs' finding or to be sarcastic.<br> <p> The "Weak Host Model" might be a known weakness. However apparently its security consequences are not well and widely known, as the OPs demonstrate by successfully attacking real world VPN setups. Therefore I think it's a laudable service by the OPs to go through the whole effort and to present their findings to the community.<br> <p> The effect of dismissing the OPs' findings and of being sarcastic is that readers with their scarce attention might infer that this is old and known and thus not attention worthy which I think is not correct: this might very well be a wide spread problem that affects many users. <br> </div> Sun, 08 Dec 2019 09:19:31 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806703/ https://lwn.net/Articles/806703/ Matlib That's part of the story. He's just discovered how IP works. <br><br> The other part – about hijacking – makes no sense as TCP connections are identified by port numbers and IP addresses for <b>both ends</b> of the connection (10.8.0.1 and 10.8.0.8 in that example). Sun, 08 Dec 2019 00:03:36 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806684/ https://lwn.net/Articles/806684/ rudis <div class="FormattedComment"> AFAICS yes. My experiments with dropping them in INPUT prevented any response from the host. But that doesn't help with other protocols like UDP.<br> </div> Sat, 07 Dec 2019 14:11:27 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806651/ https://lwn.net/Articles/806651/ fest3er <div class="FormattedComment"> WRT Linux (and netfilter), isn't a SYN-ACK without an outstanding SYN (as tracked by conntrack) an INVALID packet? If so, will dropping INVALID packets in PREROUTING significantly mitigate this problem?<br> </div> Sat, 07 Dec 2019 05:19:34 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806613/ https://lwn.net/Articles/806613/ zx2c4 <p>The related WireGuard mailing list thread can be found here: <a href="https://lore.kernel.org/wireguard/20191205191318.GA44156@zx2c4.com/">https://lore.kernel.org/wireguard/20191205191318.GA44156@zx2c4.com/</a></p> <p>I'm interested in nice workarounds that don't require netfilter and can be applied and removed ad-hoc, but so far no luck. For example, <a href="https://www.wireguard.com/netns">network namespaces are excellent</a>, but involve moving the netns of the physical interfaces, which isn't super feasible unless you're in a place of controlling the entire network stack (such as NetworkManager or something), which our little bash script, <a href="https://git.zx2c4.com/WireGuard/about/src/tools/man/wg-quick.8">wg-quick(8)</a>, is not.</p> <p>Alternatively, it might be nice to add a per-interface sysctl to enforce a strong host model for the owned IPs and routes of a <em>particular interface</em>. Discussion is ongoing.</p> Fri, 06 Dec 2019 22:47:50 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806562/ https://lwn.net/Articles/806562/ dskoll <p>Congratulations. They have re-discovered the weakness in the <a href="https://en.wikipedia.org/wiki/Host_model">Weak Host Model</a> <p>And here's how to fix: <p><tt><b>iptables -I INPUT --destination $VPN_ADDR \! -i $VPN_INTERFACE -j DROP</b></tt> Fri, 06 Dec 2019 17:02:44 +0000 VPN hijacking on Linux (and beyond) systems https://lwn.net/Articles/806551/ https://lwn.net/Articles/806551/ ncultra <div class="FormattedComment"> pretty clear from just the first two responses on the oss-security list that they should have sought more peer review before publishing the letter and their statement "We have prepared a paper for publication concerning this vulnerability and the related implications, but intend to keep it embargoed until we have found a satisfactory workaround." does not engender confidence. What, exactly, are they embargoing, when the details of the "vulnerability" are in the letter? One response points out several workarounds that exist and are established practices, that this really has nothing to do with systemd, and explains why TOR is not effected (the authors seem puzzled as to why TOR is not effected). Another response shows that dns spoofing is a more effective and reliable way of hijacking connections, so there is nothing new here.<br> </div> Fri, 06 Dec 2019 16:44:16 +0000