News for hackers. Stuff that matters.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by arp242 on Friday March 29, 2024 @12:58PM (#39866305)
I've long since said that if you want to hide something nefarious you'd do that in the GNU autoconf soup (and not in "curl | sh" scripts).

Would be interesting to see what's going on here; the person who did the releases has done previous releases too (are they affected?) And has commits going back to 2022 – relatively recent, but not that recent. Many are real commits with real changes, and they have commits on some related projects like libarchive. Seems like a lot of effort just to insert a backdoor.

Edit: anyone with access can add files to existing releases and it won't show that someone else added it (I just tested). However, the timestamp of the file will be to when you uploaded it, not that of the release. On xz all the timestamps of the files match with the timestamp of the release (usually the .tar.gz is a few minutes earlier, which makes sense). So looks like they were done by the same person who did the release. I suspected someone else might have added/altered the files briefly after the release before anyone noticed, but that doesn't seem to be the case.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by eigenvalue on Friday March 29, 2024 @01:45PM (#39866913)
Every single commit this person ever did should immediately be rolled back in all projects.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by gopher_space on Friday March 29, 2024 @01:58PM (#39867062)
It's weird and disturbing that this isn't the default perspective.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by freedomben on Friday March 29, 2024 @03:09PM (#39867805)
Well, it is much easier said than done. Philosophically I agree, but in the real world where you have later commits that might break and downstream projects, etc, it isn't very practical. It strikes me as in a similar vein to high school students and beauty pageant constestants calling for world peace. Really great goal, not super easy to implement.

I would definitely be looking at every single commit though and if it isn't obviously safe I'd be drilling in.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by concordDance on Friday March 29, 2024 @04:17PM (#39868553)
Some of those commits might fix genuine vulnerabilities. So you might trade a new backdoor for an old vulnerability that thousands of criminal orgs have bots for exploiting.

Damage wise, most orgs aren't going to be hurt much by NSA or the Chinese equivalent getting access, but a Nigerian criminal gang? They're far more likely to encrypt all your files and demand a ransom.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by mysidia on Friday March 29, 2024 @05:49PM (#39869386)
Still.. At this point the default assumption should be every commit is a vulnerability or facilitating a potential vulnerability.

For example, change from safe_fprintf to fprintf. It would be appropriate that every commit should be reviewed and either tweaked or re-written to ensure the task is being done in the safest way and doesn't have anything that is "off" or introducing a deviation from the way that codebase standardly goes about tasks within functions.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by KeplerBoy on Friday March 29, 2024 @06:53PM (#39869897)
Surely this is happening right now.

A lot of eyes are on the code. From all sides. Folks trying to find old unpatched backdoors to exploit or patch.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by maxcoder4 on Friday March 29, 2024 @04:17PM (#39868546)
Imagine someone tried to revert all the commits you ever did. Doesn't sound easy.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bananapub on Friday March 29, 2024 @05:09PM (#39869046)
it's not weird at all?

randomly reverting two years of things across dozens of repositories will break them, almost definitely make them unbuildable, but also make them unreleasable in case any other change needs to happen soon.

all of their code needs to be audited to prove it shouldn't be deleted, of course, but that can't happen in the next ten minutes.

I swear that HN has the least-thought-through hot takes of any media in the world.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by datascienced on Friday March 29, 2024 @06:36PM (#39869772)
Yeah if you tried to revert stuff that was done weeks ago on a relatively small team you know how much painstaking work it can be.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by ryanwaggoner on Friday March 29, 2024 @11:56PM (#39871710)
* I swear that HN has the least-thought-through hot takes of any media in the world.*

The irony is too good.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by kaliqt on Friday March 29, 2024 @11:55PM (#39871706)
You can't just go and rip out old code, it'll break everything else, you have to review each commit and decide what to do with each.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by maerF0x0 on Saturday March 30, 2024 @12:11PM (#39876172)
"immediately" could mean have humans swarm on the task and make a choice, as opposed to

    for commit in author_commits
        git revert $commit
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by crest on Saturday March 30, 2024 @01:35AM (#39872126)
Too much fallout.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by andruby on Friday March 29, 2024 @03:35PM (#39868098)
Hoe will you do that practically though? That’s probably thousands of commits upon which tens or hundred thousand commits from others were built. You can’t just rollback everything two years and expect it not to break or bring back older vulnerabilities that were patched in those commits.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by kjs3 on Friday March 29, 2024 @06:33PM (#39869746)
Likely part of what the attacker(s) are counting on. Anyone want to place odds this isn't the only thing that's going to be found?
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by umanwizard on Friday March 29, 2024 @09:54PM (#39871115)
I’d bet you at even odds that nothing else malicious by this person is found in 1 month, and at 1:2.5 odds that nothing is found in a year.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by kjs3 on Saturday March 30, 2024 @07:54PM (#39879854)
Only if you consider "this person" to be equal to "this identity".
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by neurostimulant on Friday March 29, 2024 @06:37PM (#39869780)
Rolling back two years worth of commits made by a major contributor is going to be hell. I'm looking forward to see how they'll do this.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by joeyh on Friday March 29, 2024 @07:09PM (#39870041)
Not really. xz worked fine 2 years ago. Roll back to 5.3.1 and apply a fix for the 1 security hole that was fixed since that old version. (ZDI-CAN-16587)

Slight oversimplification, see https://bugs.debian.org/1068024 discussion.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by kelseydh on Wednesday April 03, 2024 @04:21AM (#39914822)
This seems true with so many of these core libraries. Change for the sake of change introduces attack vectors. If it ain't broke, don't fix it!
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by account42 on Wednesday April 03, 2024 @08:30AM (#39916583)
Yeah but people will cry "dead project" if there hasn't been a release for a week.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by planb on Saturday March 30, 2024 @04:37AM (#39872963)
I don’t thinks that’s necessary: there are enough eyes on this person’s work now.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by hcks on Saturday March 30, 2024 @05:00AM (#39873082)
No one will do it seriously
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by ptx on Friday March 29, 2024 @02:06PM (#39867144)
Couldn't the autoconf soup be generated from simpler inputs by the CI/CD system to avoid this kind of problem? Incomprehensible soup as a build artifact (e.g. executables) is perfectly normal, but it seems to me that such things don't belong in the source code.

(This means you too, gradle-wrapper! And your generated wrapper for your generated wrapper. That junk is not source code and doesn't belong in the repo.)

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bonzini on Friday March 29, 2024 @02:40PM (#39867510)
Yes, it's usually regenerated already. However even the source is often pretty gnarly.

And in general, the build system of a large project is doing a lot of work and is considered pretty uninteresting and obscure. Random CMake macros or shell scripts would be just as likely to host bad code.

This is also why I like meson, because it's much more constrained than the others and the build system tends to be more modular and the complex parts split across multiple smaller, mostly independent scripts (written in Python or bash, 20-30 lines max). It's still complex, but I find it easier to organize.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by jnxx on Friday March 29, 2024 @05:12PM (#39869076)
> And in general, the build system of a large project is doing a lot of work and is considered pretty uninteresting and obscure. Random CMake macros or shell scripts would be just as likely to host bad code.

Build systems can even have undefined behaviour in the C++ sense. For example Conan 2 has a whole page on that.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by mysidia on Friday March 29, 2024 @06:07PM (#39869510)
The other thing besides the autoconf soup is the XZ project contains incomprehensible binaries as "test data"; the "bad-3-corrupt_lzma2.xz" part of the backdoor that they even put in the repo.

It's entirely possible they could have got that injection through review, even if they had that framwork and instead put it in source files used to generate autoconf soup.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by WatchDog on Friday March 29, 2024 @10:46PM (#39871395)
gradle-wrapper is just a convenience, you can always just build the project with an installed version of gradle. Although I get your point, it’s a great place to hide nefarious code.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by sslayer on Friday March 29, 2024 @01:10PM (#39866448)
I would be curious if their commits could be analyzed for patterns that could then be used to detect commits from their other account
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bombcar on Friday March 29, 2024 @02:25PM (#39867363)
One thing that is annoying is that many open source projects have been getting "garbage commits" apparently from people looking to "build cred" for resumes or such.

Easier and easier to hide this junk in amongst them.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bananapub on Friday March 29, 2024 @05:09PM (#39869050)
annoying ... and convenient for some!
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by carom on Friday March 29, 2024 @01:53PM (#39866984)
There was a DARPA program on this topic called Social Cyber. [1]

1. https://www.darpa.mil/program/hybrid-ai-to-protect-integrity...

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bodyfour on Friday March 29, 2024 @03:03PM (#39867743)
> I've long since said that if you want to hide something nefarious you'd do that in the GNU autoconf soup (and not in "curl | sh" scripts).

Yeah, I've been banging on that same drum for ages too... for example on this very site a decade ago: https://news.ycombinator.com/item?id=7213563

I'm honestly surprised that this autoconf vector hasn't happened more often... or more often that we know of.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by pretzel5297 on Saturday March 30, 2024 @04:20AM (#39872901)
Given that this was discovered by sheer luck, I'd expect way more such exploits in the wild.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bawolff on Friday March 29, 2024 @01:14PM (#39866503)
I mean, a backdoor at this scale (particularly if it wasn't noticed for a while and got into stable distros) could be worth millions. Maybe hundreds of millions (think of the insider trading possibilities alone, not to mention espionage). 2 years doesn't seem like that much work relative to the potential pay off.

This is the sort of case where america's over the top hacking laws make sense.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by jethro_tell on Friday March 29, 2024 @01:54PM (#39867006)
And what law would you use to target someone who wrote some code and posted it for free on the internet that was willingly consumed?
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bawolff on Friday March 29, 2024 @02:21PM (#39867317)
The computer abuse and fraud act? Seems like a pretty easy question to answer.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by jethro_tell on Friday March 29, 2024 @04:17PM (#39868544)
Maybe I'm miss understanding things, but it seems like anyone can publish an exploit on the internet without being a crime. In the same way encryption is free speech.

It would seem unlikely this guy would be also logging into peoples boxes after this.

It seems a much tougher job to link something like this to an intentional unauthorized access.

At this point, we have no confirmed access via compromise.

Do you know of a specific case where the existence of a backdoor has been prosecuted without a compromise?

Who would have standing to bring this case? Anyone with a vulnerable machine? Someone with a known unauthorized access. Other maintainers of the repo?

IANAL but it is unclear that a provable crime has been committed here

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bawolff on Friday March 29, 2024 @05:34PM (#39869270)
> but it seems like anyone can publish an exploit on the internet without being a crime

Of course. The mere publishing of the exploit is not the criminal part. Its the manner & intent in which it was published that is the problem.

> At this point, we have no confirmed access via compromise.

While i don't know the specifics for this particular law, generally it doesn't matter what you actually did. What is relavent is what you tried to do. Lack of success doesn't make you innocent.

> Who would have standing to bring this case?

The state obviously. This is a criminal matter not a civil one. You don't even need the victim's consent to bring a case.

[IANAL]

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by anticensor on Saturday March 30, 2024 @04:35PM (#39878385)
Some types of criminal cases are only pursued on a victim's complaint.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by alwa on Saturday March 30, 2024 @07:08PM (#39879544)
Not this kind!

See for example page 35 in the Justice Department’s computer crimes handbook (dated, but basically AIUI the same way they still do things) [0]

[0] https://www.justice.gov/d9/criminal-ccips/legacy/2015/01/14/...

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by refulgentis on Friday March 29, 2024 @05:04PM (#39868997)
> IANAL

Best to leave it at that.

It's not worth your time or the reader's time trying to come up with a technicality to make it perfectly legal to do something we know little about, other than it's extremely dangerous.

Law isn't code, you gotta violate some pretty bedrock principles to pull off something like this and get away with it.

Yes, if you were just a security researcher experimenting on GitHub, it's common sense you should get away with it*, and yes, it's hard to define a logical proof that ensnares this person, and not the researcher.

* and yes, we can come up with another hypothetical where the security researcher shouldn't get away with it. Hypotheticals all the way down.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by SolarNet on Friday March 29, 2024 @07:52PM (#39870323)
And of course an attacker like this has a high likelihood of being a state actor, comfortably secure in their native jurisdiction.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by amiga386 on Saturday March 30, 2024 @10:48AM (#39875397)
I think this thread is talking at cross-purposes.

1. It should be legal to develop or host pen-testing/cracking/fuzzing/security software that can break other software or break into systems. It should be illegal to _use_ the software to gain _unauthorised_ access to others' systems. (e.g. it's legal to create or own lockpicks and use them on your own locks, or locks you've been given permission to pick. It's not legal to gain unauthorised access _using_ lockpicks)

2. It should be illegal to develop malware that _automatically_ gains unauthorised access to systems (trojans, viruses, etc.). However, it should be legal to maintain an archive of malware, limiting access to vetted researchers, so that it can be studied, reverse-engineered and combatted. (e.g. it's illegal to develop or spread a bioweapon, but it's ok for authorised people to maintain samples of a bioweapon in order to provide antidotes or discover what properties it has)

3. What happened today: It should be illegal to intentionally undermine the security of a project by making bad-faith contributions to it that misrepresent what they do... even if you're a security researcher. It could only possibly be allowed done if an agreement was reached in advance with the project leaders to allow such intentional weakness-probing, with a plan to reveal the deception and treachery.

Remember when university researchers tried to find if LKML submissions could be gamed? They didn't tell the Linux kernel maintainers they were doing that. When the Linux kernel maintainers found out, they banned the entire university from making contributions and removed everything they'd done.

https://lkml.org/lkml/2021/4/21/454

https://arstechnica.com/gadgets/2021/04/linux-kernel-team-re...

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by refulgentis on Saturday March 30, 2024 @11:21AM (#39875682)
Talking at cross-purposes?

No, people being polite and avoiding the more direct answer that'd make people feel bad.

The rest of us understand that intuitively, and that it is already the case, so pretending there was some need to work through it, at best, validates a misconception for one individual.

Less important, as it's mere annoyance rather than infohazard: it's wildly off-topic. Legal hypotheticals where a security researcher released "rm -rf *" on GitHub and ended up in legal trouble is 5 steps downfield even in this situation, and it is a completely different situation. Doubly so when everyone has to "IANAL" through the hypotheticals.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by jethro_tell on Sunday March 31, 2024 @10:50AM (#39884778)
I'm not looking for a loophole or a legal hypothetical, I'm wondering if our laws are keeping up, which they very often do not with tech.

This is not unauthorized access, but is also clearly wrong. I'm wondering if its illegal, or if its unauthorized access . . .

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by dec0dedab0de on Saturday March 30, 2024 @01:27AM (#39872086)
By this logic you could say that leaving a poisoned can of food in a public pantry is not a crime because poison is legal for academic purposes, and whoever ate it took it willingly.

Also, I think getting malicious code into a repo counts as a compromise in and of itself.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bawolff on Saturday March 30, 2024 @07:30PM (#39879676)
Or shooting someone isn't a crime, since you only pulled the trigger. After all it was the bullet that killed them
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by unethical_ban on Saturday March 30, 2024 @08:01AM (#39874035)
Are you suggesting intent is impossible to determine?
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by account42 on Wednesday April 03, 2024 @08:39AM (#39916669)
Similar laws we use to prosecute someone who intentionally brought a poisened cake to the potluck.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by dist-epoch on Friday March 29, 2024 @03:47PM (#39868226)
> they have commits on some related projects like libarchive

Windows started using libarchive to support .rar, .7z, ...

https://arstechnica.com/gadgets/2023/05/cancel-your-winrar-t...

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by AeroNotix on Friday March 29, 2024 @02:48PM (#39867575)
Pure speculation but my guess is a specific state actor ahem is looking for developers innocently working with open source to then strongarm them into doing stuff like this.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by dec0dedab0de on Saturday March 30, 2024 @01:29AM (#39872098)
Or hiring them to do it for years without telling them why until they need a favor.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by Bulat_Ziganshin on Saturday March 30, 2024 @05:09AM (#39873136)
many people are patriots of their countries. if state agency would approach them proposing to have paid OSS work and help their country to fight terrorism/dictatorships/capitalists/whatever-they-believe, they will feel like killing two birds with one job
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by kelseydh on Wednesday April 03, 2024 @04:23AM (#39914832)
While this seems plausible, it is notable that this person seems to be anonymous from the get go. Most open source maintainers are proud of their work and maintain publicly available personas.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by account42 on Wednesday April 03, 2024 @08:37AM (#39916647)
While I don't doubt there are people who would gladly do this work for money/patriotism/whatever, adding a backdoor to your own project isn't really reconcilable with the motivations behind wanting to do OSS work.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by IshKebab on Friday March 29, 2024 @05:38PM (#39869301)
Yeah this was my first thought too. Though I think the case against autoconf is already so overwhelming I think anyone still using it is just irredeemable; this isn't going to persuade them.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by stabbles on Friday March 29, 2024 @06:41PM (#39869798)
How about wheels in the python ecosystem
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by WesolyKubeczek on Saturday March 30, 2024 @07:11AM (#39873736)
> I've long since said that if you want to hide something nefarious you'd do that in the GNU autoconf soup

If I recall correctly, xz can be built with both autoconf and cmake, are cmake configs similarly affected?

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by amiga386 on Saturday March 30, 2024 @10:50AM (#39875418)
Yes, there is evidence of sabotage on the CMake configs too.

https://git.tukaani.org/?p=xz.git;a=commit;h=f9cf4c05edd14de...