Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • Light
  • Brite
  • 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

  • Default (No Skin)
  • No Skin
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. The coreutils Rust rewrite story is pretty funny.

The coreutils Rust rewrite story is pretty funny.

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
198 Indlæg 103 Posters 149 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • puppygirlhornypost2@transfem.socialP This user is from outside of this forum
    puppygirlhornypost2@transfem.socialP This user is from outside of this forum
    puppygirlhornypost2@transfem.social
    wrote sidst redigeret af
    #96

    @ireneista@adhd.irenes.space @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place Well there's always the ability for clean room implementation, no?

    puppygirlhornypost2@transfem.socialP 1 Reply Last reply
    0
    • puppygirlhornypost2@transfem.socialP puppygirlhornypost2@transfem.social

      @ireneista@adhd.irenes.space @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place Well there's always the ability for clean room implementation, no?

      puppygirlhornypost2@transfem.socialP This user is from outside of this forum
      puppygirlhornypost2@transfem.socialP This user is from outside of this forum
      puppygirlhornypost2@transfem.social
      wrote sidst redigeret af
      #97

      @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space I will admit it does sound extremely stupid to cleanroom implement coreutils but at the same time I feel like that could have mitigated some of the issue here.

      1 Reply Last reply
      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.

        aburka@hachyderm.ioA This user is from outside of this forum
        aburka@hachyderm.ioA This user is from outside of this forum
        aburka@hachyderm.io
        wrote sidst redigeret af
        #98

        @lcamtuf they did a writeup here https://corrode.dev/blog/bugs-rust-wont-catch/#what-rust-did-prevent

        to be fair, the original uutils may not be a hotbed of memory safety bugs but the linked section cites a bunch

        1 Reply Last reply
        0
        • puppygirlhornypost2@transfem.socialP This user is from outside of this forum
          puppygirlhornypost2@transfem.socialP This user is from outside of this forum
          puppygirlhornypost2@transfem.social
          wrote sidst redigeret af
          #99

          @Doomed_Daniel@mastodon.gamedev.place @lcamtuf@infosec.exchange @ireneista@adhd.irenes.space I think you mistook musl for BusyBox. I did the same thing in my head. (musl is an MIT-licensed C standard library implementation) It appears BusyBox (alternative to gnu coreutils) is also licensed under GPLv2, unfortunately.

          1 Reply Last reply
          0
          • icing@chaos.socialI icing@chaos.social

            @david_chisnall @lcamtuf Try to write to C++ ‚cout‘ concurrently. Complete clown fiesta!🤡

            petersommerlad@mastodon.socialP This user is from outside of this forum
            petersommerlad@mastodon.socialP This user is from outside of this forum
            petersommerlad@mastodon.social
            wrote sidst redigeret af
            #100

            using std::cout concurrently does not cause data races (no UB). If youvwant to get output readably together use std::osyncstream wrapper around the global object or any other shared ostream object.

            1 Reply Last reply
            0
            • puppygirlhornypost2@transfem.socialP This user is from outside of this forum
              puppygirlhornypost2@transfem.socialP This user is from outside of this forum
              puppygirlhornypost2@transfem.social
              wrote sidst redigeret af
              #101

              @Seirdy@pleroma.envs.net @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space one of the things you notice when you're using MacOS, FreeBSD etc... they parse arguments differently. They don't rely on getopt_long (GNU's getopt shit) and so you end up with situations like

              rm -rf ./shitass -v

              not running because -v is an unknown file, and it expects the arguments before.

              puppygirlhornypost2@transfem.socialP orca@nya.oneO 2 Replies Last reply
              0
              • puppygirlhornypost2@transfem.socialP puppygirlhornypost2@transfem.social

                @Seirdy@pleroma.envs.net @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space one of the things you notice when you're using MacOS, FreeBSD etc... they parse arguments differently. They don't rely on getopt_long (GNU's getopt shit) and so you end up with situations like

                rm -rf ./shitass -v

                not running because -v is an unknown file, and it expects the arguments before.

                puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                puppygirlhornypost2@transfem.social
                wrote sidst redigeret af
                #102

                @lcamtuf@infosec.exchange @Seirdy@pleroma.envs.net @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space like it's really kinda fascinating in a way, but also immensely frustrating if you were used to "gnuisms".

                seirdy@pleroma.envs.netS puppygirlhornypost2@transfem.socialP 2 Replies Last reply
                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.

                  T This user is from outside of this forum
                  T This user is from outside of this forum
                  tobinbaker@discuss.systems
                  wrote sidst redigeret af
                  #103

                  @lcamtuf the only dumb thing I can see is that Canonical decided to switch before a comprehensive external audit had been performed.

                  1 Reply Last reply
                  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.

                    k4t3@comp.lain.laK This user is from outside of this forum
                    k4t3@comp.lain.laK This user is from outside of this forum
                    k4t3@comp.lain.la
                    wrote sidst redigeret af
                    #104
                    @lcamtuf fearless concurrency 🚀🚀🚀🚀🌕
                    1 Reply Last reply
                    0
                    • ireneista@adhd.irenes.spaceI This user is from outside of this forum
                      ireneista@adhd.irenes.spaceI This user is from outside of this forum
                      ireneista@adhd.irenes.space
                      wrote sidst redigeret af
                      #105

                      @jay @r webkitgtk is a browser engine that runs inside gtk

                      1 Reply Last reply
                      0
                      • puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                        puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                        puppygirlhornypost2@transfem.social
                        wrote sidst redigeret af
                        #106

                        @ireneista@adhd.irenes.space @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place I thought it was entirely independent from gnu coreutils.

                        1 Reply Last reply
                        0
                        • puppygirlhornypost2@transfem.socialP puppygirlhornypost2@transfem.social

                          @lcamtuf@infosec.exchange @Seirdy@pleroma.envs.net @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space like it's really kinda fascinating in a way, but also immensely frustrating if you were used to "gnuisms".

                          seirdy@pleroma.envs.netS This user is from outside of this forum
                          seirdy@pleroma.envs.netS This user is from outside of this forum
                          seirdy@pleroma.envs.net
                          wrote sidst redigeret af
                          #107

                          @puppygirlhornypost2@transfem.social @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@irenes.space ShellCheck my beloved

                          1 Reply Last reply
                          0
                          • doomed_daniel@mastodon.gamedev.placeD This user is from outside of this forum
                            doomed_daniel@mastodon.gamedev.placeD This user is from outside of this forum
                            doomed_daniel@mastodon.gamedev.place
                            wrote sidst redigeret af
                            #108

                            @Seirdy @ireneista @lcamtuf @puppygirlhornypost2

                            but things like PCRE2 are probably not that critical here, at least if there is some PCRE2-compatible regex implementation for rust that can be used there.

                            At least looking at that posts about the CVEs, the critical knowledge is what system calls to use in what order with what arguments to avoid race conditions when creating files and such (and setting their permissions)

                            seirdy@pleroma.envs.netS 1 Reply Last reply
                            0
                            • puppygirlhornypost2@transfem.socialP puppygirlhornypost2@transfem.social

                              @lcamtuf@infosec.exchange @Seirdy@pleroma.envs.net @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space like it's really kinda fascinating in a way, but also immensely frustrating if you were used to "gnuisms".

                              puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                              puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                              puppygirlhornypost2@transfem.social
                              wrote sidst redigeret af
                              #109

                              @lcamtuf@infosec.exchange @Seirdy@pleroma.envs.net @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space i find it annoying because on GNU coreutil systems i am so used to being able to just append whatever flag i forgot to put in the front and then it's like ❌ nah

                              raven667@hachyderm.ioR 1 Reply Last reply
                              0
                              • sten@chaos.socialS sten@chaos.social

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

                                wolf480pl@mstdn.ioW This user is from outside of this forum
                                wolf480pl@mstdn.ioW This user is from outside of this forum
                                wolf480pl@mstdn.io
                                wrote sidst redigeret af
                                #110

                                @sten @darkuncle @ChuckMcManis @lcamtuf
                                you expect rare race conditions to occur anywhere but production? 😛

                                darkuncle@infosec.exchangeD 1 Reply Last reply
                                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.

                                  nazokiyoubinbou@urusai.socialN This user is from outside of this forum
                                  nazokiyoubinbou@urusai.socialN This user is from outside of this forum
                                  nazokiyoubinbou@urusai.social
                                  wrote sidst redigeret af
                                  #111

                                  @lcamtuf Something something reinventing the wheel something.

                                  Jokes aside, I guess that's a very real metaphor... Wheels started off with wood, which of course can break, rip apart at high speeds, etc. We have better treatments and such for wood today than in the olden days, but it still means most of the fundamental issues remain... If you reinvented from scratch, you have to relearn some of that stuff.

                                  1 Reply Last reply
                                  0
                                  • doomed_daniel@mastodon.gamedev.placeD doomed_daniel@mastodon.gamedev.place

                                    @Seirdy @ireneista @lcamtuf @puppygirlhornypost2

                                    but things like PCRE2 are probably not that critical here, at least if there is some PCRE2-compatible regex implementation for rust that can be used there.

                                    At least looking at that posts about the CVEs, the critical knowledge is what system calls to use in what order with what arguments to avoid race conditions when creating files and such (and setting their permissions)

                                    seirdy@pleroma.envs.netS This user is from outside of this forum
                                    seirdy@pleroma.envs.netS This user is from outside of this forum
                                    seirdy@pleroma.envs.net
                                    wrote sidst redigeret af
                                    #112

                                    @Doomed_Daniel@mastodon.gamedev.place @ireneista@irenes.space @lcamtuf@infosec.exchange @puppygirlhornypost2@transfem.social I’m just saying that slim POSIX implementations that prioritize small size aren’t the best references for a clean-room GNU coreutil rewrite. FreeBSD utils and GNU documentation would be better.

                                    Given the different language, I’m not sure that lightly referencing the GNU source code would even pose a legal risk.

                                    puppygirlhornypost2@transfem.socialP 1 Reply Last reply
                                    0
                                    • hyc@mastodon.socialH hyc@mastodon.social

                                      @lcamtuf See this all the time - people storm in trying to change things before trying to understand how the current things work. People who don't learn from what's been done before. Society doesn't progress from efforts like theirs. You only make progress by learning from and building on top of what came before.

                                      w8emv@a2mi.socialW This user is from outside of this forum
                                      w8emv@a2mi.socialW This user is from outside of this forum
                                      w8emv@a2mi.social
                                      wrote sidst redigeret af
                                      #113

                                      @hyc @lcamtuf

                                      One thing that the Rust rewrite of coreutils tried to do was to prove that it was making steady progress by the number of test cases originating from GNU coreutils that it could pass.

                                      I very much suspect that there's a whole host of race condition tests that made it into the test corpus late in the game.

                                      Test-driven rewrite has its limits.

                                      Note the uptick in failures at the very right edge of the graph, they are currently under 90% tests successful.

                                      #coreutils #uutils

                                      hyc@mastodon.socialH bob_zim@infosec.exchangeB 2 Replies Last reply
                                      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.

                                        lispi314@udongein.xyzL This user is from outside of this forum
                                        lispi314@udongein.xyzL This user is from outside of this forum
                                        lispi314@udongein.xyz
                                        wrote sidst redigeret af
                                        #114
                                        @lcamtuf Or why crappy abstractions for POSIX APIs are worse.
                                        1 Reply Last reply
                                        0
                                        • seirdy@pleroma.envs.netS seirdy@pleroma.envs.net

                                          @Doomed_Daniel@mastodon.gamedev.place @ireneista@irenes.space @lcamtuf@infosec.exchange @puppygirlhornypost2@transfem.social I’m just saying that slim POSIX implementations that prioritize small size aren’t the best references for a clean-room GNU coreutil rewrite. FreeBSD utils and GNU documentation would be better.

                                          Given the different language, I’m not sure that lightly referencing the GNU source code would even pose a legal risk.

                                          puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                                          puppygirlhornypost2@transfem.socialP This user is from outside of this forum
                                          puppygirlhornypost2@transfem.social
                                          wrote sidst redigeret af
                                          #115

                                          @Seirdy@pleroma.envs.net @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space Also, BSD-Clause and MIT are compatible licenses. IANAL though, so I'm hesitant to discuss how this would actually impact "porting" BSD-Clause code from C to an MIT Licensed Rust codebase

                                          1 Reply Last reply
                                          0
                                          Svar
                                          • Svar som emne
                                          Login for at svare
                                          • Ældste til nyeste
                                          • Nyeste til ældste
                                          • Most Votes


                                          • Log ind

                                          • Har du ikke en konto? Tilmeld

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          Graciously hosted by data.coop
                                          • First post
                                            Last post
                                          0
                                          • Hjem
                                          • Seneste
                                          • Etiketter
                                          • Populære
                                          • Verden
                                          • Bruger
                                          • Grupper