r/github • • Mar 30 '24

Mixed feelings after Github took down xz-utils

I don't know if anybody of the Github Staff reads these threads here, I made this post because I have mixed feelings about the whole thing.

A couple of hours ago this bug report was posted: https://www.openwall.com/lists/oss-security/2024/03/29/4

Naturally, a lot of people began investigating the situation, I also began reading the related issues and merge requests and comments on the repository, looking through the commits of JiaT75. But now if you go the repository, you get this message:

Access to this repository has been disabled by GitHub Staff due to a violation of GitHub's terms of service

This is where I have mixed feelings. As much as I like seeing Github taking action against malicious attempt to add backdoors, I still think that this is not good at all, as now all the "crimes" are hidden (unless you've made a git clone earlier). Now you cannot see the commits, issues, comments etc anymore of the hundreds of people that began investigating the issue. I think this is in fact contra productive as it will prevent people from keeping investigating the issue.

edit: fixed lots of typos

317 Upvotes

58 comments sorted by

146

u/StevenChriss Mar 30 '24

Github actively stopped a patch from being delivered in useful time to the whole world, while completely blocking knowledge share from developers abroad.

It is the worst possible take.

39

u/Previous-Height4237 Mar 30 '24

GitHub largely has no idea how to handle CVEs outside webjunk.

Seriously, the CVE system that GitHub has doesn't even let you enter a package name if it isn't on npm or pypi.

6

u/ouuan Mar 30 '24

You can provide a package name for a custom ecosystem. I believe that the benefit of a supported ecosystem is mainly dependabot alerts.

6

u/GoodNewsDude Mar 30 '24

Maybe don't leave these important decisions to Microsoft

5

u/xeio87 Mar 30 '24

A black holed repository for ToS violation is a pretty big neon warning sign. I would hope any package manager is pulling it as well.

2

u/BlazingThunder30 Mar 31 '24

I hope not. If xz is pulled from package managers many systems will completely break. Package managers should pull the affected versions and revert back to a safe one.

2

u/cyb3rg4m3r1337 Apr 01 '24

This is the way. Just skip that version, revert and branch onwards.

2

u/roweaver6 Mar 31 '24

I am taking the traditional American approach here, that Jiat75 is innocent until *proven* guilty. Proceeding with that moral assumption, if they are not guilty, they do not deserve to be penalized without process. To the contrary, again assuming innocence, they are a victim and possibly in danger. Shutting up suspects and witnesses incommunicado is the way a false flag operation would be conducted. A well-conducted investigation starts with properly observing moral procedures. This is a Git repo. It contains a full record of what happened. Shutting off public access is a way of hiding what happened.

1

u/skesisfunk Apr 02 '24

Shutting up suspects and witnesses incommunicado is the way a false flag operation would be conducted.

Interesting. Are you suggesting one possible explanation is that MS is intentionally trying to pain FOSS in bad light?

1

u/coderman93 Apr 03 '24

The vulnerability was clearly introduced intentionally. It was too convoluted and well organized not to have been. It isn’t like the OpenSSL heartbleed vulnerability where it could easily have been introduced accidentally.

1

u/Busy-Bit9385 Apr 02 '24

But patch was delivere via Git already:
https://git.tukaani.org/

1

u/DisastrousBasis7214 Apr 04 '24

Couldn't they simply take down the affected versions? Taking the entire repository down seems like Overkill

1

u/roweaver6 Mar 31 '24

The way I think I would handle it, is to break the build at the head of master. Do a commit that git rm's the affected files and also breaks the build in some straightforward way. Include a comment on why it's done. It breaks the bleeding edge builds, so be it, it's easy to work around and fix later. And everyone gets to see the exploit. That way, the history is preserved and it precludes master going to production anywhere without a fix.

The Sept 23 was not the first commit by same author, by far. So there may be other exploits not yet detected, or that committer may not actually be the malicious party. Until determined otherwise.

32

u/Benj_2005 Mar 30 '24 edited Apr 02 '24

There seems to be a working mirror at https://git.tukaani.org/xz.git. I found this from another PR made by the malicious committer - https://github.com/google/oss-fuzz/pull/11286.

Edit: This has been confirmed to be the official repository (at least for the time being) by the other maintainer. Source

14

u/GoofyXL Mar 30 '24

Lasse Collin added a notification in the Takaani page: https://tukaani.org/xz-backdoor/

1

u/cyb3rg4m3r1337 Apr 01 '24

site is down

1

u/GoofyXL Apr 01 '24

No, it's not. It's online.

1

u/cyb3rg4m3r1337 Apr 01 '24

it was 404'ing 2 hours ago :)

11

u/lightmatter501 Mar 30 '24

The repo contained malware uploaded by one of the two people with commit privileges. The other one was unreachable at the time. This stops anyone else from pulling the repo.

Making it so that you need to go to the backup mirror off of github, which has a big malware warning on it, is a good thing here. Security researchers can get at it but normal people will probably not touch this for a while.

Right now there isn’t a patch, the solution is roll back several versions at least, potentially back to before Jia became the primary maintainer and was signing releases. All distros have the capability to do that easily using historical versions of the package.

1

u/Mkep Mar 30 '24

“Easily”, except for when other packages rely on newer versions

0

u/cyb3rg4m3r1337 Apr 01 '24

especially when the site is down

1

u/cyb3rg4m3r1337 Apr 01 '24

site is down

5

u/GoofyXL Mar 30 '24

The JiaT75 account has been suspended, as Larhzu (Lasse's Collin) account. However, visiting their account page, nothing shows that they are indeed suspended. You can see their account status only if you go to each other's followers page. Shouldn't Github show a account's status right in front of their profile page?

1

u/cyb3rg4m3r1337 Apr 01 '24

big corporate coders are the best at testing eh?

15

u/nomad-geek Mar 30 '24

This was a bad move, github. Bring it up read-only and let the OSS community take it apart.

2

u/cyb3rg4m3r1337 Apr 01 '24

We love that the hosting is owned by big boy microsoft right?

4

u/fori1to10 Mar 30 '24

Aren't there any forks one can take a look at?

7

u/DataGhostNL Mar 30 '24

I googled for '"forked from tukaani-project/xz" site:github.com' and the few repositories it returned are all disabled as well. Less than useful.

1

u/roweaver6 Mar 31 '24

I was pointed at https://rocketgit.com/user/xz-mirror/xz and cloned it around noon today.

Use caution, I don't vouch for anything. The 3/23 offending commit id matches. Keep in mind the same repo may contain other exploits.

git clone git://git.rocketgit.com/user/xz-mirror/xz

1

u/DataGhostNL Mar 31 '24

I already found that one yesterday, but the original repo/backup has since been updated to contain the missing commits as well, including at least one fix by the original maintainer: https://git.tukaani.org/?p=xz.git;a=summary

1

u/cyb3rg4m3r1337 Apr 01 '24

What is the hash?

22

u/Cybasura Mar 30 '24

Post-Microsoft GitHub is basically a proprietary infrastructure masquerading as an open source Git remote remote repository server

They dont know how to perform patching anymore, and just rely on proprietary methodologies - taking down first

3

u/onlyrealperson Mar 30 '24

I really don’t see how taking down the repo helps anything at all aside from them getting to act like they did something responsible

5

u/shiren271 Mar 30 '24

Definitely the wrong move in my book. Apart from what others have said about hiding evidence and making it harder to investigate, it also makes me question if this is their approach in general. Like, if Microsoft became aware of the vulnerability and quietly shut down the repo before the news blew up, would we all just continue using it as if nothing had happened?

0

u/cyb3rg4m3r1337 Apr 01 '24

corporate overreach at its finest.

2

u/DataGhostNL Mar 30 '24

There's a seeminly up-to-date mirror here https://rocketgit.com/user/xz-mirror/xz. Only code/log, obviously no PRs etc.

2

u/jhsu802701 Mar 30 '24

I can't believe that people down-voted me when I made a post asking about alternatives to GitHub Workflows. This should motivate people to periodically back up their GitHub repositories to other services.

0

u/cyb3rg4m3r1337 Apr 01 '24

Always do that since microsoft bought them it has been more overreach by the day.

2

u/y-c-c Apr 01 '24

I don't have mixed feelings. GitHub clearly is in the wrong here. They are actively preventing other people from investigating the issue. They could have prevented anyone from cloning it or something, but they need to make the repo visible so people can actually investigate the issue, read up on the history, etc.

At least make a fork called "xz-vulnerable" or something so we can look at it. Just having code forks is not enough because you can't read the issues and discussions.

1

u/ThetaDev256 Apr 01 '24

They should have renamed the repository to `xz-backdoored` or something like that and added a disclaimer to the description. This way they can prevent automated build scripts from pulling compromised versions while still allowing security research.

1

u/cyb3rg4m3r1337 Apr 01 '24

i dont want microsoft reaching into my repos and breaking things without notice. that just opens the door for more nefarious things.

1

u/JL2210 Apr 01 '24

And they do this while allowing actively malicious software to stay on the platform

Typical Microsoft. Don't know why we expect anything better

1

u/Busy-Bit9385 Apr 02 '24

How was GitHub security bot not able to scan the code fully?

1

u/tiredkangaroo22 Apr 03 '24

the code that allowed the backdoor to be created was well obfuscated from what ive heard

1

u/[deleted] Apr 03 '24

Can a security bot ever be on par with a cunning human mind

1

u/triangulumavalanche Mar 30 '24

Agreed OP. They should remove everyone from the org instead.

-1

u/[deleted] Mar 30 '24

thats why big corps who want to protect their ip always has backup repos

3

u/[deleted] Mar 30 '24

its very common practice for public sector to have interal repositorys so being down voted is stupid

-8

u/churn_key Mar 30 '24

All "platforms" do this whenever there is problematic information posted to their site. Their concern isn't about 3rd parties working to cleanup or investigate. Their concern is only about their liability. If you want it so much, send them a search warrant. You aren't a federal agent? Then you're out of luck.

12

u/realShaoran Mar 30 '24

They can surely freeze the repository and remove the tarballs from the released versions, put a giant banner with a warnin, I don't know.

Now you cannot even get older versions of the software https://github.com/NixOS/nixpkgs/pull/300028#issuecomment-2027858443 which is causing more harm as it prevents other projects to fix their build pipelines.

17

u/Relevant_Pause_7593 Mar 30 '24

I think they are just taking it offline to understand what needs to be done- especially as this came in on a Friday afternoon of Easter weekend. No harm done by being too careful. I’m sure it will come back next week.

8

u/GoofyXL Mar 30 '24 edited Mar 30 '24

In Github's place, I would take these actions:

  1. Remove any persons from write access to the affected repository,

  2. Put the repository in read only mode,

  3. Leave the repository public (viewable by all) so that third parties (developers) other than Github's can investigate the commit history and identify the problematic commits,

  4. Lock the specific developer from write access to *any* other Github repository.

Locking the repository from public read-only access shows that Github doesn't know what actions must be taken in such cases.

6

u/GeckoEidechse Mar 30 '24

Totally agree and additionally it should 403 any downloads of the tarballs that appear to come from automated build systems causing them to fail early so as to notify maintainers of said systems.

I think the reason GitHub didn't do all of this, is cause they don't have a system in place that allows that amount of fine-grained control.

This whole situation is quite unprecedented.

2

u/xeio87 Mar 30 '24 edited Mar 30 '24

Why would Github want to keep hosting malware though?

Even if GitHub has infrastructure to put a warning page on the website, if someone somewhere has a git-pull script that hits the Github URL there is no way to warn them they're pulling malware except to black hole it.

2

u/GoofyXL Mar 30 '24

I'm pretty sure they have the means to cut off any forks, git pull or download capabilities. The only way for a third person party to view the affected code now is to view the alternative git repository hosted at https://git.tukaani.org

Anyway, at the end it's their decision to lock the repository from public view, but it doesn't mean we all have to agree with that.

4

u/Draco1200 Mar 30 '24

This actually does a lot of harm as it hinders time-sensitive investigation into the commit history on the project which is needed to understand what happened and locate other potential badness in the codebase. And it's not being "too careful" it's recklessly cutting off access to necessary information at an essential moment. Being careful would be putting up a click-through warning to start viewing the repository and banners on the repo pages, change the paths to prevent automated tasks of other projects accidentally cloning it, etc.

The project is already "out there"; the potentially problematic package is widely distributed and integral component of live systems -- blocking access only serves to further disrupt them. It is just that the code change history itself needs people working on it to investigate that change history post-haste to work on constructing a "trustworthy" version.

The immediate rollback only addresses the Known vulnerability, not unknown ones that can have been introduced earlier; Every day there is disabled access to this Is a day the nefarious actors have to get further ahead towards potentially using other exploit vectors that may have already been planted in deployed parts of codebase that can't be reviewed due to the repository blockage.

3

u/Relevant_Pause_7593 Mar 30 '24

The analysis was already done. They identified two bad actors and deactivated them (GitHub at the user level), and then the specific commits needed to revert.