Skip to contentSkip to conversation

--passtos default on/off, and IPv6.

RFC David Woodhouse 3 participants 6 messages Oct 23, 2015 – Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

Since I seem to have accidentally come out of lurk mode anyway...

Someone has submitted a patch for OpenConnect¹ to implement something very much like OpenVPN's --passtos option.

I prefer to remain consistent with OpenVPN and other tools where possible, so we've renamed the option to '--passtos' and my first reaction was to disable it by default, like OpenVPN does.

Looking at it harder, though, I'm not sure I really want it disabled by default. It's useful for those who run VoIP over the VPN, and quite frankly the information leakage is minimal — if the attacker can't infer from those tiny packets at regular 20ms intervals that you're using VoIP, then they're probably clueless enough that they won't work it out from the QoS bits either :)

Anyone seriously suggesting that --passtos should be off by default for security reasons should probably also need to submit a patch to pad all encrypted packets to the full MTU "to prevent information leakage through packet sizes" before they're taken seriously. Or taken away. Either works for me.

So actually my preferred path for "being consistent with OpenVPN" is probably to enable it by default in OpenVPN too... unless I'm missing something?

Also, I note that OpenVPN only supports this for Legacy IP — we should be copying the TCLASS bits from IPv6 packets too, right?

And does it also make sense to copy the TOS/TCLASS bits from IPv6 payload into Legacy IP tunnel encapsulation, and vice versa? Despite the different names, are the bits expected to have the same meanings?

Finally, what about ECN? Does it makes sense to copy the ECN bits? Will routers act upon those even for non-TCP packets, and does that then leave us wanting to deal with the resulting ICMP and convey the message back inside the VPN (which frankly fills me with horror, so let's not).

Signature · 4 lines
dwmw2


¹ http://lists.infradead.org/pipermail/openconnect-devel/2015-October/003238.html
#1 lore raw

Hi,

Quoted 10 lines · David Woodhouse

I prefer to remain consistent with OpenVPN and other tools where possible, so we've renamed the option to '--passtos' and my first reaction was to disable it by default, like OpenVPN does.

Looking at it harder, though, I'm not sure I really want it disabled by default. It's useful for those who run VoIP over the VPN, and quite frankly the information leakage is minimal — if the attacker can't infer from those tiny packets at regular 20ms intervals that you're using VoIP, then they're probably clueless enough that they won't work it out from the QoS bits either :)

It's not just about traffic analysis, it is also about covert channels. An adversary on the protected network could use --passtos (or indeed packet size / timing) to create a covert channel to the unprotected network, thereby exfiltrating data.

Quoted 5 lines

Anyone seriously suggesting that --passtos should be off by default for security reasons should probably also need to submit a patch to pad all encrypted packets to the full MTU "to prevent information leakage through packet sizes" before they're taken seriously. Or taken away. Either works for me.

"Since my tires have barely any profile left, I'll just disable the brakes" (Yes, I know, car analogies don't really hold, but I couldn't resist.) Don't forget that OpenVPN in CBC mode pads packets to the cipher block size, which is 64 bits for the default BF-CBC, and 128 bits for the popular AES-CBC. That does help with disguising the *contents* of your voip call (without any padding, is has been shown to be possible to recover transcripts of actual voip calls [0]). For covert channels, it means 23 possible values per 1500-byte packet, or ~5 bits for BF, and 12 possible values (~4 bits) for AES-CBC. That is still less than the 8 bits QoS/ToS.

But yes, it would be nice to add a padding mode to OpenVPN. Especially with the upcoming AES-GCM mode, which will no longer pad packets to block size. Perhaps implemented as a 'compression' algorithm? We already have the required infrastructure in place there.

Quoted 3 lines

So actually my preferred path for "being consistent with OpenVPN" is probably to enable it by default in OpenVPN too... unless I'm missing something?

Yes, and apart from my concerns above, we should be very careful about changing this kind of behaviour. Suddenly bypassing more data might get people into problematic situations.

Quoted 11 lines

Also, I note that OpenVPN only supports this for Legacy IP — we should be copying the TCLASS bits from IPv6 packets too, right?

And does it also make sense to copy the TOS/TCLASS bits from IPv6 payload into Legacy IP tunnel encapsulation, and vice versa? Despite the different names, are the bits expected to have the same meanings?

Finally, what about ECN? Does it makes sense to copy the ECN bits? Will routers act upon those even for non-TCP packets, and does that then leave us wanting to deal with the resulting ICMP and convey the message back inside the VPN (which frankly fills me with horror, so let's not).

I'll leave it to the networking experts whether this makes as sense for IPv6 as it does for IPv4. To my untrained eye, ECN seems painful, but something equivalent to --passtos for IPv6 might make sense.

-Steffan

[0] http://www.cs.unc.edu/~fabian/papers/foniks-oak11.pdf

#2 lore raw
Quoted 4 lines · Steffan Karger

For
covert channels, it means 23 possible values per 1500-byte packet, or ~5 bits for BF, and 12 possible values (~4 bits) for AES-CBC. That is still less than the 8 bits QoS/ToS.

Grmbl, at the moment I hit send I realize I messed up bytes and bits in this back-of-the-envelope calculation. For 1500-bytes packets, there are 187 possible lengths (~8 bits) for BF-CBC, and 93 possible lengths (~7 bits) for AES-CBC. So just barely less than QoS/ToS, but --passtos would still double the bandwidth.

-Steffan

#3 lore raw
Quoted 11 lines · Steffan Karger
Quoted 4 lines · Steffan Karger

For
covert channels, it means 23 possible values per 1500-byte packet, or ~5 bits for BF, and 12 possible values (~4 bits) for AES-CBC. That is still less than the 8 bits QoS/ToS.

Grmbl, at the moment I hit send I realize I messed up bytes and bits in this back-of-the-envelope calculation. For 1500-bytes packets, there are 187 possible lengths (~8 bits) for BF-CBC, and 93 possible lengths (~7 bits) for AES-CBC. So just barely less than QoS/ToS, but --passtos would still double the bandwidth.

To be honest, you'd lost me a little before that anyway. The design goals of a VPN deployment typically *don't* include blocking that kind of covert channel anyway — and if it did, then we should all pack up and go home, because we've failed.

It's not so much "I'll just disable the brakes", but more "there's this burned-out wreck by the side of the road and three of its wheels are missing; they probably won't notice if I take the fourth".

I'm actually *more* interested in the potential for incompatibilities if we start setting the TOS bits — as we saw with stupid firewalls dropping packets when ECN was in use. That sounds like a much more reasonable argument for not doing --passtos by default, although even that is somewhat diminished these days — I think most such firewalls have been fixed now.

Signature · 1 line
dwmw2
#4 lore raw
Quoted 3 lines · David Woodhouse
Quoted 1 line · Steffan Karger

On Mon, Oct 26, 2015 at 12:09 AM, Steffan Karger <[email protected]...>

Quoted 11 lines · wrote:
Quoted 10 lines
Quoted 4 lines

For
covert channels, it means 23 possible values per 1500-byte packet, or ~5 bits for BF, and 12 possible values (~4 bits) for AES-CBC. That is still less than the 8 bits QoS/ToS.

Grmbl, at the moment I hit send I realize I messed up bytes and bits in this back-of-the-envelope calculation. For 1500-bytes packets, there are 187 possible lengths (~8 bits) for BF-CBC, and 93 possible lengths (~7 bits) for AES-CBC. So just barely less than QoS/ToS, but --passtos would still double the bandwidth.

Quoted 4 lines

To be honest, you'd lost me a little before that anyway. The design goals of a VPN deployment typically *don't* include blocking that kind of covert channel anyway — and if it did, then we should all pack up and go home, because we've failed.

Well, I will admit that is the case for the large majority of OpenVPN use cases, in particular the road warriors. But there are also use cases, such as connecting otherwise isolated networks, where this *is* a concern.

Quoted 3 lines

It's not so much "I'll just disable the brakes", but more "there's this burned-out wreck by the side of the road and three of its wheels are missing; they probably won't notice if I take the fourth".

Heh, that did make me smile :)

Quoted 6 lines

I'm actually *more* interested in the potential for incompatibilities if we start setting the TOS bits — as we saw with stupid firewalls dropping packets when ECN was in use. That sounds like a much more reasonable argument for not doing --passtos by default, although even that is somewhat diminished these days — I think most such firewalls have been fixed now.

I am actually very interested in this part too, but lack the experience to make any statements here. *waiting for Gert and/or Arne to chime in*

-Steffan

#5 lore raw
Quoted 8 lines
Quoted 7 lines

I'm actually *more* interested in the potential for incompatibilities if we start setting the TOS bits — as we saw with stupid firewalls dropping packets when ECN was in use. That sounds like a much more reasonable argument for not doing --passtos by default, although even that is somewhat diminished these days — I think most such firewalls have been fixed now.

Quoted 5 lines

I am actually very interested in this part too, but lack the experience to make any statements here. *waiting for Gert and/or Arne to chime in*

QoS and therefore TOS is almost not used in public network. A lot of switches will actually reset the TOS bit to 0x00 in the default config.

But very few apps do set ToS bits anyway so for most people passtos is probably a NOOP anyway.

And the Android (and iOS?) apps will not do passtos anyway, since setting TOS requires root capabilities (another reason that tos is not used).

Arne