News for hackers. Stuff that matters.
Re:AT&T Fiber in the SF Bay Area is flipping bits by francoisLabonte on Monday December 07, 2020 @06:40PM (#25339338)
From my professional experience of programming and debugging networking equipment, this could be a switch/router with a buffer with bad memory (stuck bit maybe). The better chips have CRC/Parity/ECC to cover such issues but there are always those magical choke points where the past CRC is tossed and the new one is generated that can leave a gaping hole. The tricky part is how often is this bad memory buffer used...

I would use traceroute to find a common bad point for everyone. It is also possible that the networking point where the problem occurs is invisible to traceroute as it could be part of a provider network probably MPLS but at least the common ends of the tunnel would be visible.

The fact that it is a a specific interval indicates a stuck bit in memory.

Some good previous public stories about such incidents https://www.verizondigitalmedia.com/blog/being-good-stewards... https://twitter.com/cperciva/status/1309568337408454658

Re:AT&T Fiber in the SF Bay Area is flipping bits by bcrl on Tuesday December 08, 2020 @12:43AM (#25342303)
Hardware designers basically started making bad decisions on this issue around the time that VLAN tagging was introduced, as well as harware forwarding of IP packets. When VLAN tags are inserted or removed, the CRC of a packet needs to be adjusted to reflect the inserted, removed and/or modified bytes from the VLAN header. Additionally Both the CRC and IP checksum of a packet needs to be adjusted when TTL is decremented as part of IP routing.

When implementing this functionality, the naive hardware designer will strip the existing CRC from the packet, modify the contents of the packet and then reuse the handy dandy CRC calculation block to place a newly calculated CRC on the packet. Similar choices are made for the adjustment of the IP/TCP/UDP checksums. If any errors are introduced in the contents of the packet by the data path prior to the new CRC is calculated, this results in the CRC being "corrected" to include the erroneous data.

A far more understanding hardware designer will instead calculate how to adjust the CRC by the changes introduced in the packet contents. Sadly, this is far more complicated to get right, and it goes against the drive of hardware designers to reuse blocks of code wherever possible. Every hardware designer working on networking has a block of Verilog or VHDL code to calculate and append a CRC to a packet. Only the most dedicated will attempt to apply only the delta needed to the CRC or checksum.

Re:AT&T Fiber in the SF Bay Area is flipping bits by simias on Tuesday December 08, 2020 @08:24AM (#25344692)
I'm not a hardware designer but I routinely deal with low level networking shenanigans and I must admit that I never considered that it would be possible to update a CRC without recomputing it fully (unless you were just appending data of course).

For people like me who aren't smart enough to figure it on their own, this stackexchange answer seem to explain how it's done: https://cs.stackexchange.com/questions/92279/can-one-quickly...

Re:AT&T Fiber in the SF Bay Area is flipping bits by watt on Tuesday December 08, 2020 @04:31AM (#25343444)
This is a great explanation of "always those magical choke points where the past CRC is tossed" that parent poster is referencing. Thank you!
Re:AT&T Fiber in the SF Bay Area is flipping bits by jeffbee on Monday December 07, 2020 @07:56PM (#25340094)
You can use ping to more easily hunt these types of issues, for example `ping -A -c 100 -s 1000 -p deadbeef` will show the difference if there is a flipped bit in the payload. You can generate patterns with xxd.
Re:AT&T Fiber in the SF Bay Area is flipping bits by miahi on Tuesday December 08, 2020 @02:16AM (#25342747)
This kind of incident happened to me in a system that was supposed to have high availability. We had failovers for hardware, but it seems that a network device that was supposed to have HA (and was set up to pass the functionality to another device in case of failure) did not have ECC memory. One memory bit got stuck at 0 and the event was not detected at network level, as the data was repacked with a "clean" CRC. For some reason the packet headers were not affected by this, maybe because they were kept in a separate memory zone or because of memory alignment. So the device did not report any kind of suspicious activity, no errors in its statistics.

On the application side the effects were quite bad, as the data was mainly XML and, depending on where the bit was flipped, it could impact the data or the XML structure. The data had its own CRC/hash, so the packets were cleanly rejected by the application. Unfortunately the XML library from the message queue engine and the ESB we were using did not like at all when the bit flipping occurred in the XML tags (it seems fuzzing tests were not done at that point) so the message processing got stuck and we kept getting bad messages in the queues. Even worse, the queues could not be cleaned with the normal procedures because the application wanted to first display info about the messages inside - and that failed.

The network debug was non-trivial because of that header consistency - the network devices did not report any kind of packet issues, so we had to sniff the different network segments to identify the culprit. From the application point of view, we had to delete the whole message queue storage to get rid of the bad messages, and let the application handle the rest (luckily it was designed with eventual consistency and self-healing).

Re:AT&T Fiber in the SF Bay Area is flipping bits by watt on Tuesday December 08, 2020 @04:28AM (#25343422)
Wasted an opportunity to implement code that would detect and handle poison-pill messages. Those will happen in any system where queue is involved and there always needs to be an escape hatch to get rid of them. Deleting the queue is too extreme.
Re:AT&T Fiber in the SF Bay Area is flipping bits by miahi on Tuesday December 08, 2020 @12:38PM (#25348607)
Deleting the queues is an operational decision that I made to be able to put the system back online after the network device was replaced (the important part was the uptime/SLA). From a quick analysis of the logs the percentage of bad messages was ~90% (there was a ~50% chance that the original "touched" bit was 0 so no change was done, but the messages had multiple "touched" bits at fixed intervals).

There was an escape hatch, but the conditions to hit it were a bit complex. Implementing new message filtering of this kind at 2AM while the system was down was not feasible.

Re:AT&T Fiber in the SF Bay Area is flipping bits by cpach on Monday December 07, 2020 @07:10PM (#25339613)
”I would use traceroute to find a common bad point for everyone“

How do you mean? I use traceroute from time to time but I’m not sure how it would apply in a case like this. Feel free to elaborate :)

Re:AT&T Fiber in the SF Bay Area is flipping bits by simcop2387 on Monday December 07, 2020 @07:24PM (#25339752)
Take a traceroute from everyone experiencing the problem, look for the common hops among them all. Then compare that list against people not experiancing the problem to find the differences. The finsl set there are good places to start looking. Sweitches and routers along that way could be the cause
Re:AT&T Fiber in the SF Bay Area is flipping bits by grayfaced on Monday December 07, 2020 @07:51PM (#25340041)
If you ping the hops with a large icmp payload, you might be able to observe the flipped bit in the echo reply. That could help isolate which hop it is.
Re:AT&T Fiber in the SF Bay Area is flipping bits by toast0 on Monday December 07, 2020 @07:57PM (#25340103)
You get some amount of your traceroute packet back too, could have flipped bits in there.
Re:AT&T Fiber in the SF Bay Area is flipping bits by toast0 on Monday December 07, 2020 @07:35PM (#25339858)
It might be better (although harder!) to take the traceroute from example.org, instead of from the clients. Forward and reverse paths often diverge, so it's important to find the path with the error.
Re:AT&T Fiber in the SF Bay Area is flipping bits by joshcaron on Monday December 07, 2020 @08:39PM (#25340527)
Some people on Twitter have started collecting IPs: https://twitter.com/alexstamos/status/1336100299841314817
Re:AT&T Fiber in the SF Bay Area is flipping bits by mitchs on Monday December 07, 2020 @10:21PM (#25341342)
They need to be capturing src/dest IPs as well as ports for AT&T to have any hope of using that data.

Edit to make the comment more useful: If anyone is curious, look up "ECMP hashing." There are probably tons of parallel paths through AT&T's network, and to narrow down to the hardware causing problems, they will need to identify which specific path was chosen. Hardware switches packets out equally viable pathways by hashing some of the attributes of the packet. Hash output % number of pathways selects which pathway at every hop.

Hardware does this because everyone wants all packets involved in the same "flow" (all packets with the same src/dest IP and port and protocol (TCP)) to deterministically go through the same set of pipes to avoid packet re-ordering. If you randomly sprayed packets, the various buffer depths of routers (or even speed of light and slightly different length fibers along the way) could cause packets to swap ordering. While TCP "copes" with reordering, it doesn't like it and and older implementations slowed way down when it happened.

Re:AT&T Fiber in the SF Bay Area is flipping bits by kevinherron on Monday December 07, 2020 @07:21PM (#25339725)
I think he means if everyone on AT&T experiencing the issue ran trace route to example.com some common hops would emerge, which would be a place to start investigating.
Re:AT&T Fiber in the SF Bay Area is flipping bits by proverbialbunny on Monday December 07, 2020 @07:21PM (#25339724)
It seems like it, but it's a widespread issue across the SF/Bay Area right now, maybe wider. I've been having it for weeks and exploring it as well. I've even gone as far as ripping the certs off of the router to double check.
Re:AT&T Fiber in the SF Bay Area is flipping bits by MarkSweep on Monday December 07, 2020 @09:50PM (#25341079)
To your point, my traceroutes on this problem often have NTT in them. It’s mostly Japanese websites, but also Wikipedia.
Re:AT&T Fiber in the SF Bay Area is flipping bits by noncoml on Monday December 07, 2020 @10:37PM (#25341469)
Why would a switch/router recalculate and rewrite the TCP checksum?
Re:AT&T Fiber in the SF Bay Area is flipping bits by dmead on Tuesday December 08, 2020 @12:11AM (#25342120)
because they're changing the payload.
Re:AT&T Fiber in the SF Bay Area is flipping bits by noncoml on Tuesday December 08, 2020 @08:17PM (#25354103)
Why?