News for hackers. Stuff that matters.
Re:Service provider story about tracking down TCP RSTs by Animats on Saturday September 01, 2018 @06:40PM (#17894271)
A consistent route for every packet in a flow is considered desirable, but it's not an entitlement or a requirement of the IP protocol. An DDOS prevention tool that insists that TTL be the same for every packet is broken. Here's one that checks for inconsistent TTL, but it has some tolerance for variation.[1] The one mentioned in the original post didn't like a difference of 1 in TTL.

[1] https://fortiguard.com/encyclopedia/ips/12934/tcp-ttl-evasio...

Re:Service provider story about tracking down TCP RSTs by maz- on Saturday September 01, 2018 @07:17PM (#17894414)
There's no DDoS prevention tool in play here (aside from that being Fastly's business).

Arista's default of having the TTL as part of the hashing function to calculate packet path means that any TCP connection that does not have a consistent TTL when it reaches this (source) ISP's routers can potentially be bucketed onto multiple different egress paths (transit or peering connections) onto different upstream SP's.

Because BGP works on the concept of AS Numbers rather than IP's (and because Fastly uses Anycast, which announces the same set of IP's from multiple POP's), it's possible that packets that leave the ISP network over different transit connections end up at different Fastly POP's, as each transit provider or peer will have a different route to Fastly's AS.

Fastly does not share TCP session information between POP's as I imagine at that scale it's massively prohibitive to do so.

The TCP RST happens because there is no established TCP session at the secondary POP which receives the TLS handshake packet, and because TTL is part of the hash function it will always end up following a different path (and therefore hitting a different datacenter, if routing stays consistent) if the TTL is reduced by 1.

It's generally deemed 'acceptable' in Anycast terms to cause a TCP RST when traffic switches from one POP to another, as this usually happens rarely, in response to changes in the path between two AS numbers.

For things like websites, browsers will usually just retry the connection, and as the path has changed and stays consistent, it starts to work and all you notice is a slight delay.

It doesn't work in this situation because the second packet with the reduced TTL is consistently routed to an 'incorrect' datacenter and breaks the TCP session every time, effectively dropping service to 0.

Re:Service provider story about tracking down TCP RSTs by londons_explore on Sunday September 02, 2018 @09:24AM (#17896918)
>It's generally deemed 'acceptable' in Anycast terms to cause a TCP RST when traffic switches from one POP to another...

>For things like websites, browsers will usually just retry the connection

This is not the case. Every single TCP RST you send on an active http connection will lead to an http request failing in a way which causes application brokenness. No browser auto-retries in that case. The user always has to hit refresh to fix it.

Re:Service provider story about tracking down TCP RSTs by cnst on Monday September 03, 2018 @02:21AM (#17900734)
At least with the TCP RST it'll fail fast. What's annoying is that some providers decide that you aren't worthy of the RST; then your browser has to wait for like 3 minutes until the timeout is reached — really annoying.
Re:Service provider story about tracking down TCP RSTs by _wmd on Saturday September 01, 2018 @07:00PM (#17894334)
I'm not a networker, but sounds like from a correctness standpoint, a problem on Fastly's end -- they're reusing frontend IPs for distinct sets of machines, and traffic directed to the 'wrong' PoP is dropped hard rather than attempting any kind of internal routing

Of course that kind of routing would create a potential bottleneck for an attacker to exploit ("simply" force traffic to the wrong IPs to the wrong PoP, assuming $attacker had this level of access to the backbone), but that's the problem Fastly are supposedly paid to deal with

Their scheme is fine and dandy with a protocol like DNS where UDP retries are transparent and TCP is a tiny fraction of weird traffic, but for business applications handling credit cards, surely the occasional RST is already too many

Or another way to look at it, basically they're saying their IP addresses are special snowflakes and actually the full address includes the route, and source networks are wrong for assuming things work the way they're supposed to everywhere else on the Internet

Re:Service provider story about tracking down TCP RSTs by cnst on Monday September 03, 2018 @02:28AM (#17900766)
> Of course that kind of routing would create a potential bottleneck for an attacker to exploit ("simply" force traffic to the wrong IPs to the wrong PoP, assuming $attacker had this level of access to the backbone)

It's actually simpler than that — the state of the TCP connection is controlled by the hosts to the TCP connection, so, all it takes is for a "client" host to pretend that the connection has already been established (sending a single packet alleging as such) — no need for any special access to any backbone.

Re:Service provider story about tracking down TCP RSTs by windowsworkstoo on Saturday September 01, 2018 @09:02PM (#17894836)
Not really. Anycast is fairly standard and usable for stateful connections - the issue is again middleboxes fucking with stuff and a weird default of incorporating TTL in the ECMP hashing algo
Re:Service provider story about tracking down TCP RSTs by toast0 on Saturday September 01, 2018 @10:23PM (#17895164)
Expecting all flows to have all packets on a flow delivered via the same path is extremely optimistic.
Re:Service provider story about tracking down TCP RSTs by jiveturkey on Tuesday September 04, 2018 @03:58PM (#17912281)
> Anycast is fairly standard and usable for stateful connections

please cite some sources to back this up. i find this statement surprising.

Re:Service provider story about tracking down TCP RSTs by spydum on Saturday September 01, 2018 @07:19PM (#17894425)
i tend to agree: anycasting stateful services is always a gamble.. however, i do think including ttl in the ecmp hashing alg is prone to failure, and is probably a poor default.
Re:Service provider story about tracking down TCP RSTs by alecbenzer on Sunday September 02, 2018 @12:39PM (#17897550)
You mean 'stateful' at the IP layer, right? So anything using TCP counts as "stateful"?

Like, an application which implemented "stateless" HTTP endpoints would still run into this issue?