48 Followers
77 Following
834 Posts

Comfy account for friends. Follow if I follow you or if we talked afk. No official accounts pls.

@ UnFUG 2016-2023
@ Chaostreff Backnang 2023-????
Während des Studiums beim UnFUG aktiv, daher die Domain.
Mittlerweile im Backnang beim Chaostreff aktiv.

"you're not stupid, you're comfy" - @sorunome

"will you put me in your bio if I give you a kiss?" - @EviMily

"Look at me! I somehow made it to Maxim's bio as well?? hihi" - @maze

"I thought I was in Maxim's bio" - @sin

"Du bist ja auch schon verführerisch :3" - @autinerd

Pronounshe/him
Languagesde,en,fr
Matrix@maxim:unfug.hs-furtwangen.de
🎂1998-07-10

"Ich kann hier keine Bugs finden"
"Dann gibt's wohl keinen"
"Eine Fehlermeldung ist dann wohl ein Feature?"
"Wenn sie gut geschrieben ist, ja"
"Es ist PHP"
"Ja, dann..."

#ctbkleaks

To everyone travelling back from Hamburg: There is currently a repair on the catenary in Hamburg-Altona which delays trains. Check if your train is delayed! #39c3

Edit: Repairs are supposedly done, delays are still possible

I know to check the CI Pipeline status because it triggers a relay turning a device off/on for testing, which makes a nice clicking sound
Getting clicker trained to check the CI pipeline

Soooo, turns out the variable doesn't get set/used correctly by sshd for some reason??? So disabling the hardware acceleration didn't actually fix it, it seems I just got very lucky at that moment.

What *does* reliably work, though, is forcing ssh to use only a specific processor. CPUs 0 and 1 are consistently broken, the others CPU work just fine. So it *is* a CPU issue.

I uploaded up the script this, in case you want it to test if your computer is affected (needs passwordless access to root via ssh):
https://0x0.st/8w6y.sh

Digging down further, it seems the issue is indeed with the encryption: chacha20-poly1305 and aes{128,256}-gcm are broken, other ones work fine. So at least I have a workaround now for any ssh issue I encounter: Restrict the ciphers.

Since OpenSSL doesn't offer a way to run these algorithms in the shell (related? maybe, idk), I grab one of the examples python-cryptography (which uses OpenSSL) and adapt it for testing:

https://0x0.st/8wIR.py

Turns out encrypting the same data with the same key material twice in a row can have different results. Uhh... that definitely shouldn't be the case.

Now I got something to test without running ssh. Setting the magic variable OPENSSL_ia32cap I can disable the hardware acceleration again. By toggling different capability bits, I figure out the thing that was causing issues is AVX2.

Sooo... the issue is definitely the first CPU core, with both threads affected, the AVX2 instructions broken in *some* way, leading to mangled encrypted data which leads to connection issues & silent data corruption with scp.

For the record, the affected CPU is an "AMD Ryzen 7 PRO 5850U", as included in a Lenovo T14 Gen 2 (Type 20XL). So if you have a T14 Gen 2... you may want to check the scripts.

Spent lots of time today debugging weird ssh connection issues, including corrupted files/bitflips in files transferred by scp and connection issues with rsync (which detects said corruption).

It got to the point where I ran memtest86 to see if I had bad RAM. Stopped after two passes seeing zero errors.

Tried disabling hardware acceleration of all cryptographic functions in OpenSSL.

It works.

OH: Wir essen nur böse Leute #ctbkleaks
@BahnAnsagen "Wir erreichen in kürze das geilste Dorf der Welt: Gaildorf West"
@BahnAnsagen "Spätzlesäquator Stuttgart"
@BahnAnsagen : Der nächste Halt ist das schnellste Dorf der Welt, Schnelldorf