119 points

Thank you open source for the transparency.

permalink
report
reply
69 points

And thank you Microsoft.

permalink
report
parent
reply
65 points

Shocking, but true.

permalink
report
parent
reply
14 points

They just pay some dude that is doing good work

permalink
report
parent
reply
21 points

I have heard multiple times from different sources that building from git source instead of using tarballs invalidates this exploit, but I do not understand how. Is anyone able to explain that?

If malicious code is in the source, and therefore in the tarball, what’s the difference?

permalink
report
reply
47 points

Because m4/build-to-host.m4, the entry point, is not in the git repo, but was included by the malicious maintainer into the tarballs.

permalink
report
parent
reply
13 points

Tarballs are not built from source?

permalink
report
parent
reply
35 points
*

The tarballs are the official distributions of the source code. The maintainer had git remove the malicious entry point when pushing the newest versions of the source code while retaining it inside these distributions.

All of this would be avoided if Debian downloaded from GitHub’s distributions of the source code, albeit unsigned.

permalink
report
parent
reply
14 points
*

I don’t understand the actual mechanics of it, but my understanding is that it’s essentially like what happened with Volkswagon and their diesel emissions testing scheme where it had a way to know it was being emissions tested and so it adapted to that.

The malicious actor had a mechanism that exempted the malicious code when built from source, presumably because it would be more likely to be noticed when building/examining the source.

Edit: a bit of grammar. Also, this is my best understanding based on what I’ve read and videos I’ve watched, but a lot of it is over my head.

permalink
report
parent
reply
13 points

The malicious code is not on the source itself, it’s on tests and other files. The building process hijacks the code and inserts the malicious content, while the code itself is clean, So the co-manteiner was able to keep it hidden in plain sight.

permalink
report
parent
reply
6 points

So it’s not that the Volkswagen cheated on the emissions test. It’s that running the emissions test (as part of the building process) MODIFIED the car ITSELF to guzzle gas after the fact. We’re talking Transformers level of self modification. Manchurian Candidate sleeper agent levels of subterfuge.

permalink
report
parent
reply
16 points

it had a way to know it was being emissions tested and so it adapted to that.

Not sure why you got downvoted. This is a good analogy. It does a lot of checks to try to disable itself in testing environments. For example, setting TERM will turn it off.

permalink
report
parent
reply
10 points

The malicious code wasn’t in the source code people typically read (the GitHub repo) but was in the code people typically build for official releases (the tarball). It was also hidden in files that are supposed to be used for testing, which get run as part of the official building process.

permalink
report
parent
reply
2 points

I think it is the other way around. If you build from Tarball then you getting pwned

permalink
report
parent
reply
8 points
*

The malicious code was written and debugged at their convenience and saved as an object module linker file that had been stripped of debugger symbols (this is one of its features that made Fruend suspicious enough to keep digging when he profiled his backdoored ssh looking for that 500ms delay: there were no symbols to attribute the cpu cycles to).

It was then further obfuscated by being chopped up and placed into a pure binary file that was ostensibly included in the tarballs for the xz library build process to use as a test case file during its build process. The file was supposedly an example of a bad compressed file.

This “test” file was placed in the .gitignore seen in the repo so the file’s abscense on github was explained. Being included as a binary test file only in the tarballs means that the malicious code isn’t on github in any form. Its nowhere to be seen until you get the tarball.

The build process then creates some highly obfuscated bash scripts on the fly during compilation that check for the existence of the files (since they won’t be there if you’re building from github). If they’re there, the scripts reassemble the object module, basically replacing the code that you would see in the repo.

Thats a simplified version of why there’s no code to see, and that’s just one aspect of this thing. It’s sneaky.

permalink
report
parent
reply
18 points

Any additional information been found on the user?

permalink
report
reply
2 points

Probably Chinese?

permalink
report
parent
reply
26 points
*

Can’t confirm but unlikely.

Via https://boehs.org/node/everything-i-know-about-the-xz-backdoor

They found this particularly interesting as Cheong is new information. I’ve now learned from another source that Cheong isn’t Mandarin, it’s Cantonese. This source theorizes that Cheong is a variant of the 張 surname, as “eong” matches Jyutping (a Cantonese romanisation standard) and “Cheung” is pretty common in Hong Kong as an official surname romanisation. A third source has alerted me that “Jia” is Mandarin (as Cantonese rarely uses J and especially not Ji). The Tan last name is possible in Mandarin, but is most common for the Hokkien Chinese dialect pronunciation of the character 陳 (Cantonese: Chan, Mandarin: Chen). It’s most likely our actor simply mashed plausible sounding Chinese names together.

permalink
report
parent
reply
3 points

So this doesn’t really tell us one way or the other who this person is or isn’t.

permalink
report
parent
reply
3 points

That actually suggests not Chinese due to naming inconsistencies

permalink
report
parent
reply
2 points

Just because somebody picked a vaguely Chinese-sounding handle doesn’t mean much about who or where.

permalink
report
parent
reply
2 points

That’s why I put the question mark

permalink
report
parent
reply
4 points
*

They’re more likely to be based in Eastern Europe based on the times of their commits (during working hours in Eastern European Time) and the fact that while most commits used a UTC+8 time zone, some of them used UTC+2 and UTC+3: https://rheaeve.substack.com/p/xz-backdoor-times-damned-times-and

permalink
report
parent
reply
3 points

It is also hard to be certain as they could be a night owl or a early riser.

permalink
report
parent
reply
12 points
*

as long as you’re up to date on everything here: https://boehs.org/node/everything-i-know-about-the-xz-backdoor

the only additional thing i’ve seen noted is a possibilty that they were using Arch based on investigation of the tarball that they provided to distro maintainers

permalink
report
parent
reply
237 points

Don’t forget all of this was discovered because ssh was running 0.5 seconds slower

permalink
report
reply
91 points

Its toooo much bloat. There must be malware XD linux users at there peak!

permalink
report
parent
reply
96 points
*

Tbf 500ms latency on - IIRC - a loopback network connection in a test environment is a lot. It’s not hugely surprising that a curious engineer dug into that.

permalink
report
parent
reply
40 points

Especially that it only took 300ms before and 800ms after

permalink
report
parent
reply
48 points

Postgres sort of saved the day

permalink
report
parent
reply
20 points

RIP Simon Riggs

permalink
report
parent
reply
80 points

Half a second is a really, really long time.

permalink
report
parent
reply
26 points

reminds of Data after the Borg Queen incident

permalink
report
parent
reply
2 points

Which ep/movie are you referring to?

permalink
report
parent
reply
6 points

If this exploit was more performant, I wonder how much longer it would have taken to get noticed.

permalink
report
parent
reply
34 points

Is that from the Microsoft engineer or did he start from this observation?

permalink
report
parent
reply
45 points

From what I read it was this observation that led him to investigate the cause. But this is the first time I read that he’s employed by Microsoft.

permalink
report
parent
reply
15 points

I’ve seen that claim a couple of places and would like a source. It very well may be since Microsoft prefers Debian based systems for WSL and for azure, but its not something I would have assumed by default

permalink
report
parent
reply
52 points

Technically that wasn’t the initial entrypoint, paraphrasing from https://mastodon.social/@AndresFreundTec/112180406142695845 :

It started with ssh using unreasonably much cpu which interfered with benchmarks. Then profiling showed that cpu time being spent in lzma, without being attributable to anything. And he remembered earlier valgrind issues. These valgrind issues only came up because he set some build flag he doesn’t even remember anymore why it is set. On top he ran all of this on debian unstable to catch (unrelated) issues early. Any of these factors missing, he wouldn’t have caught it. All of this is so nuts.

permalink
report
parent
reply
80 points

I have been reading about this since the news broke and still can’t fully wrap my head around how it works. What an impressive level of sophistication.

permalink
report
reply
80 points
*

And due to open source, it was still caught within a month. Nothing could ever convince me more than that how secure FOSS can be.

permalink
report
parent
reply
95 points

Idk if that’s the right takeaway, more like ‘oh shit there’s probably many of these long con contributors out there, and we just happened to catch this one because it was a little sloppy due to the 0.5s thing’

This shit got merged. Binary blobs and hex digit replacements. Into low level code that many things use. Just imagine how often there’s no oversight at all

permalink
report
parent
reply
49 points

Yes, and the moment this broke other project maintainers are working on finding exploits now. They read the same news we do and have those same concerns.

permalink
report
parent
reply
28 points

I was literally compiling this library a few nights ago and didn’t catch shit. We caught this one but I’m sure there’s a bunch of “bugs” we’ve squashes over the years long after they were introduced that were working just as intended like this one.

The real scary thing to me is the notion this was state sponsored and how many things like this might be hanging out in proprietary software for years on end.

permalink
report
parent
reply
11 points

Can be, but isn’t necessarily.

permalink
report
parent
reply
8 points

Yea, but then heartbleed was a thing for how long that no-one noticed?

The value of foss is so many people with a wide skill set can look at the same problematic code and dissect it.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.1K

    Monthly active users

  • 6.4K

    Posts

  • 174K

    Comments