Skip to content Skip to footer
0 items - $0.00 0

NixOS and reproducible builds could have detected the xz backdoor by birdculture

NixOS and reproducible builds could have detected the xz backdoor by birdculture

30 Comments

  • Post Author
    IshKebab
    Posted March 22, 2025 at 9:09 pm

    Yeah it certainly would have made hiding the backdoor more difficult. But far from impossible. You can always hide backdoors in source code if you want, it just takes more effort to make a plausible bug, and probably has a higher chance of detection.

  • Post Author
    ltbarcly3
    Posted March 22, 2025 at 9:11 pm

    Yes, if you use a trusted framework then you are safe from things until that framework is attacked. The xz backdoor might have been detected, but the xz backdoor wasn't crafted with the goal of working against the Nix ecosystem. When a nix core developer ends up being a spy or whatever then there will end up being an attack against the nix ecosystem. Don't reply to this with some claim that Nix is inherently secure unless you want me to track you down and make you admit you were wrong when Nix ends up getting successfully exploited in a year or two.

  • Post Author
    lolinder
    Posted March 22, 2025 at 9:22 pm

    Note that NixOS and reproducible builds did not detect the xz backdoor, and in fact NixOS shipped the malicious builds of xz (though they didn't do anything because the malware didn't target NixOS):

    > I am a NixOS developer and I was surprised when the backdoor was revealed to see that the malicious version of xz had ended up being distributed to our users.

    As always theory and reality are different, and the thing that made xz possible was never a technical vulnerability with a technical solution—xz was possible because of a meatspace exploit. We as a community are very very bad at recognizing that you can't always just patch meatspace with better software.

  • Post Author
    lotharcable
    Posted March 22, 2025 at 9:30 pm

    So the argument hinges on the fact that the XZ maintainer hid malicious code in the tarballs that were not checked into Git.

    The author demonstrates that Nix can be configured to generate the tarballs from git that go into building the binaries.

    What I don't see, however, is how is this a feature that requires Nix or NixOS?

    Any build system out there (including the stuff that goes into RPMs and Debs) can be configured to generate tarballs as a intermediate step.

    In fact making reproducible builds is a major thing that Debian has been working on for some time now.

    https://wiki.debian.org/ReproducibleBuilds

  • Post Author
    rowanG077
    Posted March 22, 2025 at 10:01 pm

    it's somehow immensely funny to me that some state probably had an entire project to land this backdoor in xz, spend literal years to make it happen. And then it was immediately detected and all effort was for nothing.

  • Post Author
    datadeft
    Posted March 22, 2025 at 10:11 pm

    could have / should have => being smart retrospectively

  • Post Author
    mcint
    Posted March 22, 2025 at 10:20 pm

    Excellent descriptive analysis. Wrong, misleading title, perhaps "technically correct," but at best with a "backdoored" meaning.

    It points out the need and use for build-manager tools that go a step beyond union file system layers, but track then enforce that e.g. tests cannot pollute build artifacts. Take a causal trace graph of files affecting files, in the build process, make that trace graph explicit, and then build a way to enforce that graph, or report on deviations from previous trace graphs.

  • Post Author
    nialv7
    Posted March 22, 2025 at 10:25 pm

    I feel the author is a bit tunnel visioned by what happens to happen this time. The Jiatan incident has a sample size of one, it'd be a bit short sighted to think that's the only way it could happen. You can imagine various scenarios where the defenses suggested here will not have worked.

    Also I (as a nix user myself) think it's unlikely NixOS would have caught it. As evidenced by the fact that it didn't. (Yeah I realize I just said next time it might happen differently but it'd be foolish to put faith in nix without evidence).

  • Post Author
    MortyWaves
    Posted March 22, 2025 at 11:26 pm

    I don't like how this site causes my headphones to crackle…

  • Post Author
    donnachangstein
    Posted March 22, 2025 at 11:52 pm

    NixOS is really irrelevant here because the xz backdoor specifically targeted RedHat and Debian. It's equally relevant to say the xz backdoor didn't affect Windows (ironically the backdoor was ultimately found by a Microsoft employee, an oft-overlooked detail).

  • Post Author
    massysett
    Posted March 23, 2025 at 12:10 am

    Article says that distributions should get source code directly from the VCS (for instance Github) rather than the traditional installation tarball.

    I don’t see what this solves though. Couldn’t a malicious maintainer simply add binary blobs directly to the source code repository?

    The author suggests Github is trusted, as though Github validates code in some way. Which of course it does not.

  • Post Author
    a-dub
    Posted March 23, 2025 at 12:15 am

    llm commit scanning might be an interesting approach to the oss supply chain security problem.

  • Post Author
    sirspamalot101
    Posted March 23, 2025 at 12:28 am

    [flagged]

  • Post Author
    sirspamalot102
    Posted March 23, 2025 at 12:29 am

    [flagged]

  • Post Author
    sirspamalot103
    Posted March 23, 2025 at 12:30 am

    [dead]

  • Post Author
    sirspamalot104
    Posted March 23, 2025 at 12:31 am

    [flagged]

  • Post Author
    sirspamalot105
    Posted March 23, 2025 at 12:31 am

    [flagged]

  • Post Author
    sirspamalot106
    Posted March 23, 2025 at 12:32 am

    [dead]

  • Post Author
    sirspamalot107
    Posted March 23, 2025 at 12:34 am

    [flagged]

  • Post Author
    sirspamalot108
    Posted March 23, 2025 at 12:34 am

    [flagged]

  • Post Author
    sirspamalot110
    Posted March 23, 2025 at 12:36 am

    [dead]

  • Post Author
    sirspamalot111
    Posted March 23, 2025 at 12:36 am

    [flagged]

  • Post Author
    __MatrixMan__
    Posted March 23, 2025 at 12:38 am

    If we want to focus on a thing that NixOS could have prevented, we should focus on the CrowdStrike incident. Being able to boot to yesterday's config because today's config isn't working would've mitigated most of the problems.

  • Post Author
    sirspamalot112
    Posted March 23, 2025 at 12:38 am

    [dead]

  • Post Author
    sirspamalot113
    Posted March 23, 2025 at 12:39 am

    [flagged]

  • Post Author
    dataflow
    Posted March 23, 2025 at 12:45 am

    Why is nobody questioning this:

    > To build xz from sources, we need autoconf to generate the configure script. But autoconf has a dependency on xz!

    Both directions of this seem crazy to me.

    1. Why the heck should a build configuration tool like autoconf be unable to function without a compression tool like xz? That makes no sense on its face.

    2. For that matter, why the heck should xz, a tool that is supposedly so fundamental, have a hard dependency on a boilerplate generator like autoconf?

    At the end of the day all autoconf is doing is telling you how to invoke your compiler. You ought to have a way to do that without the tool, even if it produces a suboptimal binary. If you care about security, instead of taking a giant tarball you don't understand and the running another tool in it, shouldn't you just generate that command line somehow (even in an untrusted fashion), review it, and then use that human-verified script to bootstrap?

    And if you need a (de)compressor that low on the dependency tree so that literally the entire world might one day rest on it, surely you can isolate the actual computation for bootstrapping purposes and just expose it with just the open/read/write/close syscalls as dependencies? Why do you need all the bells and whistles?

  • Post Author
    banana_dick_1
    Posted March 23, 2025 at 12:53 am

    [flagged]

  • Post Author
    banana_dick_10
    Posted March 23, 2025 at 1:00 am

    [dead]

  • Post Author
    banana_dick_14
    Posted March 23, 2025 at 1:04 am

    [dead]

  • Post Author
    wwarner
    Posted March 23, 2025 at 2:16 am

    Learned a lot reading this article!

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.