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.
  • 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.

    dec23k@mastodon.ieD This user is from outside of this forum
    dec23k@mastodon.ieD This user is from outside of this forum
    dec23k@mastodon.ie
    wrote sidst redigeret af
    #148

    @lcamtuf
    $ mkfafo --version

    1 Reply Last reply
    0
    • hllizi@hespere.deH hllizi@hespere.de

      @fogti @ireneista @lcamtuf but why do it at all? I'm usually among the first to advocate beating with blunt objects as punishment for using C in any serious context, but these are some of the most extensively stress-tested pieces of software known to mankind and, as the OT states, not to be expected to be plagued by hideous hidden memory bugs anyway.

      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
      #149

      @hllizi @fogti @lcamtuf the moment words are committed to paper, they begin to feel inadequate. a thing made by humans can be perfect, only so long as it does not yet exist....

      ireneista@adhd.irenes.spaceI 1 Reply Last reply
      0
      • ireneista@adhd.irenes.spaceI ireneista@adhd.irenes.space

        @hllizi @fogti @lcamtuf the moment words are committed to paper, they begin to feel inadequate. a thing made by humans can be perfect, only so long as it does not yet exist....

        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
        #150

        @hllizi @fogti @lcamtuf or at least that's how we feel about our own works 🙂

        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.

          S This user is from outside of this forum
          S This user is from outside of this forum
          spacelifeform@infosec.exchange
          wrote sidst redigeret af
          #151

          @lcamtuf

          Just another solution in search of a problem.

          #EEE

          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.

            timwardcam@c.imT This user is from outside of this forum
            timwardcam@c.imT This user is from outside of this forum
            timwardcam@c.im
            wrote sidst redigeret af
            #152

            @lcamtuf "The original code accounted for decades of hard-learned lessons in that space."

            Yeah, that was in a textbook - sorry, forget which one - I read decades ago. Not news.

            (The general message as described in that sentence, not this specific case.)

            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.

              L This user is from outside of this forum
              L This user is from outside of this forum
              luc0x61@mastodon.gamedev.place
              wrote sidst redigeret af
              #153

              @lcamtuf The Tiobe index still gives Rust very low percentages: it will take some years to rise as Java did before, or to go where Python is now. Someone ignites faster, some slower, but in the end they all live in the hope to burn C. Which doesn't take fire, and looks at all these fireballs passing.
              Or maybe not, and suddenly C will disappear. I bet my five cents it won't happen in my lifetime. In any case, I voluntary plan to be cremated 😉 And to not be listed on Tiobe index! 😂

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

                orca@nya.oneO This user is from outside of this forum
                orca@nya.oneO This user is from outside of this forum
                orca@nya.one
                wrote sidst redigeret af
                #154
                @puppygirlhornypost2@transfem.social @Seirdy@pleroma.envs.net @lcamtuf@infosec.exchange @Doomed_Daniel@mastodon.gamedev.place @ireneista@adhd.irenes.space
                (dnf, redhat's package manager, doesn't either🫠)
                1 Reply Last reply
                0
                • r@glauca.spaceR r@glauca.space

                  @q @ireneista @erincandescent @pinskia @lcamtuf we know *for sure* that browsers get involved in "emoji presentation" because we reported a bug in that area

                  Firefox also has a hack workaround to ignore "Segoe UI Emoji" for country flags, specifically to fix Mastodon (and some other sites of this nature which use a "OS font stack" philosophy)

                  r@glauca.spaceR This user is from outside of this forum
                  r@glauca.spaceR This user is from outside of this forum
                  r@glauca.space
                  wrote sidst redigeret af
                  #155

                  @q @ireneista @erincandescent @pinskia @lcamtuf 💭 y'know, with how much advanced typography browsers actually do support....

                  we've seen an extremely stale and unimaginative set of UI/UX paradigms that take advantage of basically none of it

                  ireneista@adhd.irenes.spaceI 1 Reply Last reply
                  0
                  • r@glauca.spaceR r@glauca.space

                    @q @ireneista @erincandescent @pinskia @lcamtuf 💭 y'know, with how much advanced typography browsers actually do support....

                    we've seen an extremely stale and unimaginative set of UI/UX paradigms that take advantage of basically none of it

                    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
                    #156

                    @r @q @erincandescent @pinskia @lcamtuf yeah exactly.... it's no longer a generative process, in the social sense. new features no longer fire up public excitement to see what people can make with them.

                    ireneista@adhd.irenes.spaceI 1 Reply Last reply
                    0
                    • darkuncle@infosec.exchangeD darkuncle@infosec.exchange

                      @ChuckMcManis @lcamtuf came to say this, you beat me to it, well done

                      S This user is from outside of this forum
                      S This user is from outside of this forum
                      strickland@mastodon.social
                      wrote sidst redigeret af
                      #157

                      @darkuncle @ChuckMcManis @lcamtuf 😀🥰♥️♥️

                      1 Reply Last reply
                      0
                      • ireneista@adhd.irenes.spaceI ireneista@adhd.irenes.space

                        @r @q @erincandescent @pinskia @lcamtuf yeah exactly.... it's no longer a generative process, in the social sense. new features no longer fire up public excitement to see what people can make with them.

                        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
                        #158

                        @r @q @erincandescent @pinskia @lcamtuf ouch.... we just realized, the last time we saw people excited to be creative with a new browser feature

                        it was JPEG XL

                        r@glauca.spaceR doomed_daniel@mastodon.gamedev.placeD 2 Replies Last reply
                        0
                        • ireneista@adhd.irenes.spaceI ireneista@adhd.irenes.space

                          @r @q @erincandescent @pinskia @lcamtuf ouch.... we just realized, the last time we saw people excited to be creative with a new browser feature

                          it was JPEG XL

                          r@glauca.spaceR This user is from outside of this forum
                          r@glauca.spaceR This user is from outside of this forum
                          r@glauca.space
                          wrote sidst redigeret af
                          #159

                          @ireneista @q @erincandescent @pinskia @lcamtuf oh, that's way more recent than the last time we were excited: the long painful drawn-out process of rolling out ES6 modules (which apparently "everybody else" gave up on, because bundlers)

                          1 Reply Last reply
                          0
                          • simonzerafa@infosec.exchangeS simonzerafa@infosec.exchange

                            @lcamtuf

                            Deus forbid if they create a functional specification of how the existing utilities work, before converting / rewriting them in a new language 😟🤦‍♂️

                            beandev@social.tchncs.deB This user is from outside of this forum
                            beandev@social.tchncs.deB This user is from outside of this forum
                            beandev@social.tchncs.de
                            wrote sidst redigeret af
                            #160

                            @simonzerafa
                            But the question is also where the responsibility lies for the lack of documentation and (much more importantly) unit tests. If the learning curve was so steep when it came to eliminating all race conditions, where are the tests that verified precisely these issues? Of course, it’s clear that the bug-fixing culture at the time didn’t have a “must-have 100% test coverage” requirement. But it’s also not easy to implement these tests now through reverse engineering.

                            I don't think a lack of documentation and testing is necessarily the main obstacle to a new development. In fact, they might even be a reason for it.

                            However, you shouldn't put such newly developed software into production right away.
                            @lcamtuf

                            1 Reply Last reply
                            0
                            • raymaccarthy@mastodon.ieR raymaccarthy@mastodon.ie

                              @lcamtuf
                              I learned C++ after Modula-2 and before C.
                              I learned programming earlier.

                              Learning a programming language isn't learning programming (extracting requirements, specification, design, coding, test etc).
                              I looked at Rust. C++ certainly has got too complicated since 1987, but I wonder does Rust *only* help with memory safety?
                              Main memory safety in general relates to using pointers that are invalid, accessing arrays out of bounds and past the end of strings.
                              Partly bad libraries & design.

                              beandev@social.tchncs.deB This user is from outside of this forum
                              beandev@social.tchncs.deB This user is from outside of this forum
                              beandev@social.tchncs.de
                              wrote sidst redigeret af
                              #161

                              @raymaccarthy
                              Main memory safety in general, including threads. So, it's a "little" bit more 😉

                              @lcamtuf

                              1 Reply Last reply
                              0
                              • lispi314@udongein.xyzL lispi314@udongein.xyz

                                @xerz@soc.masfloss.net @hypha@cafe.mycelium.locahlo.st @star@fed.amazonawaws.com @lcamtuf@infosec.exchange Last I had heard from gccrust is that it couldn’t even be used for bootstrap compiling yet, without enforcing any of the semantics a Rust compiler is expected to.

                                It’s unclear whether it also now does that as of this progress report or not. If it does then that would be progress indeed.

                                star@fed.amazonawaws.comS This user is from outside of this forum
                                star@fed.amazonawaws.comS This user is from outside of this forum
                                star@fed.amazonawaws.com
                                wrote sidst redigeret af
                                #162
                                @lispi314 @xerz @hypha @lcamtuf you don't need borrow checking in well-formed programs. You need borrow checking to ensure a program is safe. the rust compiler is currently the definition of what is well-formed so you don't really have an advantage if you compile the 1.49 sources with or without borrow checking
                                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.

                                  tael@yiff.lifeT This user is from outside of this forum
                                  tael@yiff.lifeT This user is from outside of this forum
                                  tael@yiff.life
                                  wrote sidst redigeret af
                                  #163

                                  @lcamtuf Of course it didn't, an LLM wouldn't account for that.

                                  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.

                                    varx@cybersecurity.theaterV This user is from outside of this forum
                                    varx@cybersecurity.theaterV This user is from outside of this forum
                                    varx@cybersecurity.theater
                                    wrote sidst redigeret af
                                    #164

                                    @lcamtuf People keep stepping on that rake.

                                    1 Reply Last reply
                                    0
                                    • K kynx@fosstodon.org

                                      @ChuckMcManis @lcamtuf now why the hell, after all these years, have I not heard of Chesterton’s Fence? Is this what I missed by not learning my trade at a uni? Kinda rhetorical, but I _still_ feel I must’ve missed something other than the debt…

                                      Anyway, thank you. It’s going to provide a nice two-worder when reviewing prs by newbies - and a lot of oldbies and, lest l forget, their sloppy chums.

                                      gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                                      gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                                      gumnos@mastodon.bsd.cafe
                                      wrote sidst redigeret af
                                      #165

                                      @Kynx

                                      If it's any comfort, I got my bachelor's degree in CS, yet Chesterton's Fence was never mentioned there. I only learned it later in life due to memes. So don't feel bad about the uni thing ☺

                                      @ChuckMcManis @lcamtuf

                                      S 1 Reply Last reply
                                      0
                                      • taschenorakel@mastodon.greenT taschenorakel@mastodon.green

                                        @BalooUriza People who hate the GPL and wanted to get rid of it, from what I heard.

                                        @lcamtuf

                                        gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                                        gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                                        gumnos@mastodon.bsd.cafe
                                        wrote sidst redigeret af
                                        #166

                                        @taschenorakel

                                        It also felt like a fair bit of "this is a known quantity and a fun task to undertake just because I'm learning a new language". Almost like a joke that got taken too far 😑

                                        @BalooUriza @lcamtuf

                                        1 Reply Last reply
                                        0
                                        • gumnos@mastodon.bsd.cafeG gumnos@mastodon.bsd.cafe

                                          @Kynx

                                          If it's any comfort, I got my bachelor's degree in CS, yet Chesterton's Fence was never mentioned there. I only learned it later in life due to memes. So don't feel bad about the uni thing ☺

                                          @ChuckMcManis @lcamtuf

                                          S This user is from outside of this forum
                                          S This user is from outside of this forum
                                          shadsterling@mastodon.social
                                          wrote sidst redigeret af
                                          #167

                                          @gumnos @Kynx @ChuckMcManis @lcamtuf same. I still have to look it up every time I see it mentioned, and every time I think “oh, right; yeah, obviously”

                                          gumnos@mastodon.bsd.cafeG 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