Skip to content
  • Kategorien
  • Aktuell
  • Tags
  • Beliebt
  • World
  • Benutzer
  • Gruppen
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen

other.li Forum

  1. Übersicht
  2. Uncategorized
  3. The coreutils Rust rewrite story is pretty funny.

The coreutils Rust rewrite story is pretty funny.

Geplant Angeheftet Gesperrt Verschoben Uncategorized
77 Beiträge 51 Kommentatoren 0 Aufrufe
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • ? Gast

    @raymaccarthy
    well allegedly its types are meant to aid in type driven design and better domain modelling; but i dont know if this is actually seen in practice in better code structure. same could be said of cxx + its classes
    @lcamtuf

    ? Offline
    ? Offline
    Gast
    schrieb zuletzt editiert von
    #25

    @zardoz03 @lcamtuf
    Strong types help, but loads of languages had that 40 years ago.

    1 Antwort Letzte Antwort
    0
    • ? Gast

      @lcamtuf Rustaceans are the problem, not Rust itself. theyre like a lobbing group trying explicitly to boost their future employment demand much more than prioritized on doing the right thing as engineers or for the community. much like the AI VC are "talking up their book" even if its poison for the rest of us

      ? Offline
      ? Offline
      Gast
      schrieb zuletzt editiert von
      #26

      @synlogic4242 Uutils started as someone’s personal project to learn rust, and “write a system utility” is frequently used as a basic exercise for learning. Uutils is doing exactly what it set out to do.

      It’s not the fault of uutils that Canonical is dumb.

      @lcamtuf

      ? 1 Antwort Letzte Antwort
      0
      • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

        The coreutils Rust rewrite story is pretty funny.

        Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

        But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

        https://seclists.org/oss-sec/2026/q2/332

        PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

        ? Offline
        ? Offline
        Gast
        schrieb zuletzt editiert von
        #27

        @lcamtuf There's also that human habit of getting complacent about all bugs when _some_ types of bugs are either impossible or very very hard to make because of language structure and tooling.

        ? 1 Antwort Letzte Antwort
        0
        • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

          The coreutils Rust rewrite story is pretty funny.

          Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

          But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

          https://seclists.org/oss-sec/2026/q2/332

          PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

          ? Offline
          ? Offline
          Gast
          schrieb zuletzt editiert von
          #28

          @lcamtuf a related observation would probably be: why did important, security-critical edge cases get handled without enough documentation to prevent them from reoccurring?

          ? 1 Antwort Letzte Antwort
          0
          • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

            The coreutils Rust rewrite story is pretty funny.

            Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

            But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

            https://seclists.org/oss-sec/2026/q2/332

            PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

            ? Offline
            ? Offline
            Gast
            schrieb zuletzt editiert von
            #29

            @lcamtuf Why do we keep calling uutils coreutils a rewrite?

            1 Antwort Letzte Antwort
            0
            • ? Gast

              @synlogic4242 Uutils started as someone’s personal project to learn rust, and “write a system utility” is frequently used as a basic exercise for learning. Uutils is doing exactly what it set out to do.

              It’s not the fault of uutils that Canonical is dumb.

              @lcamtuf

              ? Offline
              ? Offline
              Gast
              schrieb zuletzt editiert von
              #30

              @rmq @lcamtuf I view it as both their fault. I'm pissed that after having to deal with Copy.Fail I now have to wipe other people's butts again for them. and I worry this will happen with more frequency as more vibe-coded software spreads around

              1 Antwort Letzte Antwort
              0
              • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                The coreutils Rust rewrite story is pretty funny.

                Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                https://seclists.org/oss-sec/2026/q2/332

                PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                ? Offline
                ? Offline
                Gast
                schrieb zuletzt editiert von
                #31

                @lcamtuf Hey, would you care to elaborate or point me to resources explaining why the coreutils aren't fertile ground for memory safety issues? It's the first time I heard of this

                1 Antwort Letzte Antwort
                0
                • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                  The coreutils Rust rewrite story is pretty funny.

                  Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                  But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                  https://seclists.org/oss-sec/2026/q2/332

                  PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                  ? Offline
                  ? Offline
                  Gast
                  schrieb zuletzt editiert von
                  #32

                  @lcamtuf Not only that, some of the utils were not command line-compatible with their non-Rust counterparts.

                  Honestly, I don't understand why these utils were rewritten. They didn't need rewriting.

                  ? ? 2 Antworten Letzte Antwort
                  0
                  • ? Gast

                    @ChuckMcManis @lcamtuf sometimes that's the only way to learn, but it's also often the most effective way to learn

                    ? Offline
                    ? Offline
                    Gast
                    schrieb zuletzt editiert von
                    #33

                    @darkuncle @ChuckMcManis @lcamtuf Sure, but perhaps don't do your learning in production? 🙂

                    ? ? ? 3 Antworten Letzte Antwort
                    0
                    • ? Gast

                      @hyc @lcamtuf ie. be like LEGO not Death Stars

                      ? Offline
                      ? Offline
                      Gast
                      schrieb zuletzt editiert von
                      #34

                      https://www.lego.com/en-us/product/death-star-75419 would like a word. 😇

                      @synlogic4242 @hyc @lcamtuf

                      ? 1 Antwort Letzte Antwort
                      0
                      • ? Gast

                        @darkuncle @ChuckMcManis @lcamtuf Sure, but perhaps don't do your learning in production? 🙂

                        ? Offline
                        ? Offline
                        Gast
                        schrieb zuletzt editiert von
                        #35

                        @sten @ChuckMcManis @lcamtuf sometimes you have to get burned to learn not to touch the stove 😂

                        1 Antwort Letzte Antwort
                        0
                        • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                          The coreutils Rust rewrite story is pretty funny.

                          Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                          But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                          https://seclists.org/oss-sec/2026/q2/332

                          PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                          ? Offline
                          ? Offline
                          Gast
                          schrieb zuletzt editiert von
                          #36

                          @lcamtuf
                          Many of those seemingly trivial utilities are surprisingly complex: sort runs in multiple concurrent threads, "cp -a" must build a lookup table to detect hardlinks, and ps parses obscure files in /proc. There's plenty of ways to screw up that a type- and memory-safe language would catch.

                          That said, the list of CVEs in the post is really impressive. Ditching the good old GNU coreutils might have been a tad overhasty.

                          1 Antwort Letzte Antwort
                          0
                          • ? Gast

                            https://www.lego.com/en-us/product/death-star-75419 would like a word. 😇

                            @synlogic4242 @hyc @lcamtuf

                            ? Offline
                            ? Offline
                            Gast
                            schrieb zuletzt editiert von
                            #37

                            @wonka @hyc @lcamtuf TBF if I knew I might have to keep rebuilding my Death Star from scratch every time the Rebellion blew it up for plot reasons I'd much prefer to do it in LEGO

                            1 Antwort Letzte Antwort
                            0
                            • ? Gast

                              @lcamtuf i do find that the crates dedicated to atomic file handling and temp files, in the interest of providing a uniform platform interface aren't as good as what's reachable in c.

                              it's not a fault of the rust language per se, but writing a safe interface at that level isn't easy, so it makes sense (and is in some sense a better default) to have high level, platform neutral access here.

                              ? Offline
                              ? Offline
                              Gast
                              schrieb zuletzt editiert von
                              #38

                              @prozacchiwawa @lcamtuf yeah, but coreutils is an interface for shell languages. The shell doesn't care if underlying "util" was written in C or Rust

                              1 Antwort Letzte Antwort
                              0
                              • ? Gast

                                @darkuncle @ChuckMcManis @lcamtuf Sure, but perhaps don't do your learning in production? 🙂

                                ? Offline
                                ? Offline
                                Gast
                                schrieb zuletzt editiert von
                                #39

                                @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

                                ? ? ? 3 Antworten Letzte Antwort
                                0
                                • ? Gast

                                  @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

                                  ? Offline
                                  ? Offline
                                  Gast
                                  schrieb zuletzt editiert von
                                  #40

                                  @m33 @sten @darkuncle @ChuckMcManis @lcamtuf
                                  yep, production is for debugging

                                  1 Antwort Letzte Antwort
                                  0
                                  • ? Gast

                                    @lcamtuf Not only that, some of the utils were not command line-compatible with their non-Rust counterparts.

                                    Honestly, I don't understand why these utils were rewritten. They didn't need rewriting.

                                    ? Offline
                                    ? Offline
                                    Gast
                                    schrieb zuletzt editiert von
                                    #41

                                    @sten @lcamtuf Someone said vigorously "don't break userspace". Now we need "don't break userland" or something

                                    1 Antwort Letzte Antwort
                                    0
                                    • ? Gast

                                      @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

                                      ? Offline
                                      ? Offline
                                      Gast
                                      schrieb zuletzt editiert von
                                      #42

                                      @m33
                                      I discovered at Google a tremendous laziness and lack of rigor because "well if it doesn't work or has problems we can roll it back." I came to think of it as The Google Principle and it can be more easily written as:

                                      The amount of care and thought that goes into a software change is proportional to the perceived difficulty of pushing that change into production.

                                      @sten @darkuncle @lcamtuf

                                      ? 1 Antwort Letzte Antwort
                                      0
                                      • ? Gast

                                        @lcamtuf Not only that, some of the utils were not command line-compatible with their non-Rust counterparts.

                                        Honestly, I don't understand why these utils were rewritten. They didn't need rewriting.

                                        ? Offline
                                        ? Offline
                                        Gast
                                        schrieb zuletzt editiert von
                                        #43

                                        @sten @lcamtuf

                                        MIT licensing vs GPL.

                                        (I'm not joking.)

                                        ? 1 Antwort Letzte Antwort
                                        0
                                        • ? Gast

                                          @lcamtuf a related observation would probably be: why did important, security-critical edge cases get handled without enough documentation to prevent them from reoccurring?

                                          ? Offline
                                          ? Offline
                                          Gast
                                          schrieb zuletzt editiert von
                                          #44

                                          @groxx

                                          ...I like how you assume people read comments. It gives me hope.

                                          @lcamtuf

                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          • Anmelden

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Kategorien
                                          • Aktuell
                                          • Tags
                                          • Beliebt
                                          • World
                                          • Benutzer
                                          • Gruppen