Malicious updates made to a ubiquitous tool were a few weeks away from going mainstream.
See full article...
See full article...
They very obviously mean that we don't know if Jia Tan is a person, or if it is a pseudonym for someone or several someones else.Of course there was a real world person or persons behind Jia Tan! We just don't know the details so that's a strangely worded conclusion. I don't think we've created AI that is advanced enough to run this scam all by itself.
Nobody claimed that it was done by AI. What is apparently unclear, however, is whether the actions of “Jia Tan” were all done by the same person, or whether that handle is a front for the members of a larger group or organization, e.g. an intelligence service or state-sponsored hackers. I.e. would there be one person to hold accountable for it, or was it a group effort done under a single name?Of course there was a real world person or persons behind Jia Tan! We just don't know the details so that's a strangely worded conclusion. I don't think we've created AI that is advanced enough to run this scam all by itself.
There's a bit about this I haven't seen explained. Why should linking libsystemd alone produce this issue if XZ is not otherwise used? AIUI, libsystemd is linked to get access to sd_notify, no xz required for that (nor any other SSH functionality). I'm guessing that liblzma (pulled in by libsystemd) has some initializer functions that get called even though its contents are not actually used. As I said, I haven't yet seen this bit explained.It should be noted that the attack only works because Debian and Redhat added functionality to sshd that is not present in it as distributed by its developers. The extra functionality adds systemd interaction, which requires libsystemd which requires liblzma, a component of the (compromised) xz package.
This conclusion ignores the huge value that the patches that all OS apply to packages provides. Without patches much upstream software will not build, will not run correctly.It should be noted that the attack only works because Debian and Redhat added functionality to sshd that is not present in it as distributed by its developers. The extra functionality adds systemd interaction, which requires libsystemd which requires liblzma, a component of the (compromised) xz package.
One should be wary of distributions adding functionality. Often it increases the attack surface, not only because of the modifications/additions themselves, but also by adding dependencies.
It should be noted that the attack only works because Debian and Redhat added functionality to sshd that is not present in it as distributed by its developers. The extra functionality adds systemd interaction, which requires libsystemd which requires liblzma, a component of the (compromised) xz package.
One should be wary of distributions adding functionality. Often it increases the attack surface, not only because of the modifications/additions themselves, but also by adding dependencies.
The prime reason is a very well funded and capable attacker looked for a way in.So a prime reason this became potentially exploitable is libsystemd in OpenSSH. Need I say more.
There's a difference between patches to make it build and adding stuff. Also you underestimate the quality of the ssh code, it is highly portable.This conclusion ignores the huge value that the patches that all OS apply to packages provides. Without patches much upstream software will not build, will not run correctly.
I should also point out that it is (hyper) common for scientific packages to reuse other packages. In the statistics and bioinformatics world, we use R a lot - let’s say if I’m going to install a common Bioinformatics package DESeq2, it has more than 8 dependencies - all those dependencies in turn may have more dependencies and the dependency tree gets more dense with each point being a potential source of malicious code.The whole world got lucky that one developer was determined enough to discover the cause of a minor performance regression. Just makes you wonder what else hasn't yet been discovered in our open source tooling out there.
Really eye opening, thank you Andres!
Edit: And of course, Dan for the wonderful article.
When a lib is loaded, it's init code is executed. Te patched liblzma then uses ifunc to patch the running sshdThere's a bit about this I haven't seen explained. Why should linking libsystemd alone produce this issue if XZ is not otherwise used? AIUI, libsystemd is linked to get access to sd_notify, no xz required for that (nor any other SSH functionality). I'm guessing that liblzma (pulled in by libsystemd) has some initializer functions that get called even though its contents are not actually used. As I said, I haven't yet seen this bit explained.
I do know that the OpenSSH devs are very strict on not increasing attack surface. The main reason why they did not want to link to systemd in the distributed version. You can be sure that OpenSSH as distributed contains less opportunity for attackers than the modified versions. That's my main point: modifications by distributions are not always improvements.The prime reason is a very well funded and capable attacker looked for a way in.
if not xz or systemd then they would have attacked via the next candidate weak point.
It’s a lot more complicated than that.The key point begins the last paragraph and is comprehensible to all.
"What more do we know about Jia Tan?
At the moment, extremely little, especially for someone entrusted to steward a piece of software as ubiquitous and as sensitive as xz Utils."
Trust mysterious actors? Elementary folly.
And almost the definition of an open source contributor.The key point begins the last paragraph and is comprehensible to all.
"What more do we know about Jia Tan?
At the moment, extremely little, especially for someone entrusted to steward a piece of software as ubiquitous and as sensitive as xz Utils."
Trust mysterious actors? Elementary folly.
Right? I didn’t realise until I read this article just how far back this started. Now you’ve got to wonder: if this was a group, how many other so-far benign identities they have, contributing good code and building up reputations. And how easy it would be for them to slip a little something into another fundamental tool."This developer persona has touched dozens of other pieces of open-source software in the past few years.". Well, I guess the Opensource community have some codes to review. Maybe the xz incident is only the tips of the iceberg.
No need, you proved all we needed to know about you with that sentence alone.So a prime reason this became potentially exploitable is libsystemd in OpenSSH. Need I say more.
1. Fuzzing scans for programming errors/vulnerabilities, which can be exploited maliciously, not "signs of maliciousness"For instance, Tan replaced Collins's contact information with their own on Microsoft's oss-fuzz, a project that scans open-source software for signs of maliciousness.
I agree, but this does not appear to be an unsolvable problem. There are lots of people who spend their entire working life "simply" testing things like food, fire equipment, working conditions, etc. Apparently we have yet to accept the fact that software and scientific papers are critical tools today.It’s easy enough to point at the affair and scream: “Aha! So we need less coders and more testers!” The problem is, no one wants to be the tester. It’s exactly like the problem surrounding peer-reviewed science papers: the flow of fraudulent papers never stops because no one qualified to do peer reviews wants to spend all their time doing it.
No, one single Postgres developer (not a "researcher") - Andres Freund - revealed the discovery of a backdoor. Everybody else piled in to help, but he is the sole 'discoverer'. Credit where credit is due. (And everyone should buy Andres a beer.)On Friday, researchers revealed the discovery of a backdoor [...]
It strikes me that downvoters of your post are probably delusional. There's much about the world of OSS software that pivots on people being nice, and there's many that hold dearly to the notion that everyone is. We've just witnessed the (near) consequence of blind trust in some well established project.Shocking to see that this was only discovered by accident. This presumably means that the software we are using is full of backdoors ...
It uses glibc's ifunc mechanism. That lets a library provide multiple implementations of a function (typically optimised for different CPUs), plus a resolver function which chooses one of those implementations. When the library is loaded, the loader will execute the resolver, and then any calls to the ifunc will efficiently jump to the chosen implementation.There's a bit about this I haven't seen explained. Why should linking libsystemd alone produce this issue if XZ is not otherwise used? AIUI, libsystemd is linked to get access to sd_notify, no xz required for that (nor any other SSH functionality). I'm guessing that liblzma (pulled in by libsystemd) has some initializer functions that get called even though its contents are not actually used. As I said, I haven't yet seen this bit explained.
_get_cpuid()
, instead of the usual __get_cpuid()
(with two underscores). _get_cpuid
is implemented in a binary .o file (hidden in test data) and initialises the runtime backdoor, intercepting calls to RSA_public_decrypt.__attribute__((constructor))
and insert that via the backdoored build script) - it looks like the approach with ifuncs was chosen for obfuscation. Even if someone noticed liblzma executing code at load-time in sshd and got suspicious, they'd trace it and see that it was crc64_resolve calling _get_cpuid, and they'd look at the git log and see an entirely plausible reason for that code, and probably they'd accept that and wouldn't investigate any further.So like the guy who said the package wasn’t being updated fast enough or often enough? It’s sad that a few new accounts or non-contributors can so easily put pressure on a maintainer.4. Unpleasant people who harass maintainers should be detected and treated appropriately.
"Working" is the important word here. As far as I can tell from reading the news, a big reason this exploit almost succeeded was because no one was getting paid to work on xz. "So pay 'em!" you say. Where is the money gonna come from?I agree, but this does not appear to be an unsolvable problem. There are lots of people who spend their entire working life "simply" testing things like food, fire equipment, working conditions, etc. Apparently we have yet to accept the fact that software and scientific papers are critical tools today.
As far as I can tell from the writeup, the payload is that a person with the master key can get a root shell on any distro running SSH on a port they can reach, while having the bogus version of xz installed.It seems we still know very little about the actual payload itself, or is Ars deliberately sparse on details?
I haven't yet seen a detailed analysis of what the hijacked functions actually do. Accepting a master key is kind of a given, but the fact it also has a kill switch [1] is interesting in and of itself...
[1] https://piaille.fr/@zeno/112185928685603910
Wouldn't this mean any software loading the vulnerable version(s) of liblzma would have targeted a running sshd instance?When a lib is loaded, it's init code is executed. Te patched liblzma then uses ifunc to patch the running sshd