Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
starman ( starman@programming.dev )  to Nix / NixOS@programming.devEnglish · 1 year ago

How the xz backdoor highlights a major flaw in Nix | Shade's Blog

shadeyg56.vercel.app

external-link
message-square
11
link
fedilink
  • cross-posted to:
  • linux@lemmy.ml
28
external-link

How the xz backdoor highlights a major flaw in Nix | Shade's Blog

shadeyg56.vercel.app

starman ( starman@programming.dev )  to Nix / NixOS@programming.devEnglish · 1 year ago
message-square
11
link
fedilink
  • cross-posted to:
  • linux@lemmy.ml
Background On Friday, March 29th, 2024, a historical and sophisticated security vulnerability (CVE-2024-3094) was discovered in the XZ Utils package and liblzma api in version 5.6.0 and 5.6.1. While this vulnerability mostly affects Debian and RedHat distributions, there was some interesting discussion regarding xz and Nix. How did this affect Nix and NixOS? The truth is not a whole lot in reality. I saw conflicting reports, but supposedly, the tarballs of xz that Nix downloads were not infected.
alert-triangle
You must log in or register to comment.
  • GarlicToast ( GarlicToast@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Nix lets you go back, and you and even mix channels. Pulling one package from a different version.

    • starman ( starman@programming.dev ) OP
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      1 year ago

      That’s true, but you have to know there was a backdoor first. If someone doesn’t know, and they use the latest version, they’re vulnerable to attack

      • Dan MacLeod :PUA: ( danmac@aus.social ) 
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        @starman @GarlicToast true but I don’t think you can use nix and not know about the xz exploit within minutes of it being found out.

        • onlinepersona ( onlinepersona@programming.dev ) 
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          Do you have an RSS feed of CVEs impacting Nixos?

          Anti Commercial AI thingy

          CC BY-NC-SA 4.0

          • λλλ ( lambda@programming.dev ) 
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            I believe the point they were making is that if you are techy enough to use nix, they are likely the type to keep up to date with news like this.

      • GarlicToast ( GarlicToast@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        NixOS is aimed at highly technical people. You literally code your system structure.

      • pbsds ( pbsds@lemmy.ml ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        If the issue had been critical, then the branch head could be rolled back, causing everyone to downgrade

        • Atemu ( Atemu@lemmy.ml ) 
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          1 year ago

          That’s a nice idea in theory but not possible in practice as the last Nixpkgs revision without a tainted version of xz is many months old. You’d trade one CVE for dozens of others.

    • Atemu ( Atemu@lemmy.ml ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That works for leaf packages but not for core node packages. Every package depends on xz in some way; it’s in the stdenv aswell as bootstrap.

      • GarlicToast ( GarlicToast@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You are right, it will be a mess to pull xz from a different hash. This is why you go back to an older build, and keep only packages you need on the newer version.

        • Atemu ( Atemu@lemmy.ml ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Those packages themselves depend on xz. Pretty much all of them.

          What you’re suggesting would only make the xz executable not be backdoored anymore but any other application using liblzma would still be as vulnerable as before. That’s actually the only currently known attack vector; inject malicious code into SSHD via liblzma.

Nix / NixOS@programming.dev

nix@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !nix@programming.dev

Main links

  • website
  • wiki
  • matrix

Videos

  • Linux Experiment about NixOS
  • Chris Titus Tech
  • Mental Outlaw
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 17 users / day
  • 54 users / week
  • 149 users / month
  • 336 users / 6 months
  • 32 local subscribers
  • 2.44K subscribers
  • 250 Posts
  • 853 Comments
  • Modlog
  • mods:
  • Erlingur ( erlingur@programming.dev ) 
  • ballmerpeaking ( ballmerpeaking@programming.dev ) 
  • WhiteBlackGoose ( WhiteBlackGoose@programming.dev ) 
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code