Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • 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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. *Zero* out of the six pending #curl CVEs are C mistakes.

*Zero* out of the six pending #curl CVEs are C mistakes.

Scheduled Pinned Locked Moved Uncategorized
curl
30 Posts 20 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bagder@mastodon.socialB bagder@mastodon.social

    *Zero* out of the six pending #curl CVEs are C mistakes. They are all logical mistakes that would have happened anyway even if we had used another language.

    tdelmas@mamot.frT This user is from outside of this forum
    tdelmas@mamot.frT This user is from outside of this forum
    tdelmas@mamot.fr
    wrote last edited by
    #2

    @bagder You know that's not completely true. They may have happened, yes.

    But with a finite time to write and review the code, all the time taken focusing on avoiding "C mistakes" could have been used focusing of the logic instead.

    (Also, languages with stronger types do provide states and types encapsulation that can help avoid some types of logic mistakes)

    bagder@mastodon.socialB A thradams@social.vivaldi.netT rylik@mastodon.socialR greg@icosahedron.websiteG 5 Replies Last reply
    0
    • tdelmas@mamot.frT tdelmas@mamot.fr

      @bagder You know that's not completely true. They may have happened, yes.

      But with a finite time to write and review the code, all the time taken focusing on avoiding "C mistakes" could have been used focusing of the logic instead.

      (Also, languages with stronger types do provide states and types encapsulation that can help avoid some types of logic mistakes)

      bagder@mastodon.socialB This user is from outside of this forum
      bagder@mastodon.socialB This user is from outside of this forum
      bagder@mastodon.social
      wrote last edited by
      #3

      @tdelmas that's just guessing though. Whatever language and environment you pick, you need to work with that environment a bit to find your way. Memory-safe or not.

      levitte@mastodon.nuL tdelmas@mamot.frT floooh@mastodon.gamedev.placeF afx@infosec.exchangeA 4 Replies Last reply
      0
      • bagder@mastodon.socialB bagder@mastodon.social

        @tdelmas that's just guessing though. Whatever language and environment you pick, you need to work with that environment a bit to find your way. Memory-safe or not.

        levitte@mastodon.nuL This user is from outside of this forum
        levitte@mastodon.nuL This user is from outside of this forum
        levitte@mastodon.nu
        wrote last edited by
        #4

        @bagder @tdelmas
        Nah. Rewrite it all in Common Lisp. No mistakes can happen then...

        corpsmoderne@mamot.frC 1 Reply Last reply
        0
        • bagder@mastodon.socialB bagder@mastodon.social

          @tdelmas that's just guessing though. Whatever language and environment you pick, you need to work with that environment a bit to find your way. Memory-safe or not.

          tdelmas@mamot.frT This user is from outside of this forum
          tdelmas@mamot.frT This user is from outside of this forum
          tdelmas@mamot.fr
          wrote last edited by
          #5

          @bagder Yes. But with C, you have to, first and foremost, focus on memory safety mistakes, because their effect can bypass almost all security implemented. With that out of the way, it really helps to focus on other mistakes.

          bagder@mastodon.socialB 1 Reply Last reply
          0
          • System shared this topic
          • bagder@mastodon.socialB bagder@mastodon.social

            @tdelmas that's just guessing though. Whatever language and environment you pick, you need to work with that environment a bit to find your way. Memory-safe or not.

            floooh@mastodon.gamedev.placeF This user is from outside of this forum
            floooh@mastodon.gamedev.placeF This user is from outside of this forum
            floooh@mastodon.gamedev.place
            wrote last edited by
            #6

            @bagder @tdelmas also see: https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773

            ...some of those CVEs are also quite embarrassing, and this is a fairly mature project, going back to at least 2019.

            E.g. I wonder if some Rust programmers may suffer from an 'overconfidence syndrome' where they think that just using a memory safe language with a strong typesystem protects them from making mistakes, while C programmers learn very early to never trust the compiler 😉

            gloriouscow@oldbytes.spaceG 1 Reply Last reply
            0
            • bagder@mastodon.socialB bagder@mastodon.social

              @tdelmas that's just guessing though. Whatever language and environment you pick, you need to work with that environment a bit to find your way. Memory-safe or not.

              afx@infosec.exchangeA This user is from outside of this forum
              afx@infosec.exchangeA This user is from outside of this forum
              afx@infosec.exchange
              wrote last edited by
              #7

              @bagder @tdelmas As someone who grew up writing and selling my own software in Modula-2 in the 80s, I strongly disagree. Decent languages with strong typing and other checks are definitely more efficient than that pseudo assembler called C.

              1 Reply Last reply
              0
              • floooh@mastodon.gamedev.placeF floooh@mastodon.gamedev.place

                @bagder @tdelmas also see: https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773

                ...some of those CVEs are also quite embarrassing, and this is a fairly mature project, going back to at least 2019.

                E.g. I wonder if some Rust programmers may suffer from an 'overconfidence syndrome' where they think that just using a memory safe language with a strong typesystem protects them from making mistakes, while C programmers learn very early to never trust the compiler 😉

                gloriouscow@oldbytes.spaceG This user is from outside of this forum
                gloriouscow@oldbytes.spaceG This user is from outside of this forum
                gloriouscow@oldbytes.space
                wrote last edited by
                #8

                @floooh @bagder @tdelmas

                As a Rust programmer who started in C and knows all about nasal demons, I find that the Rust borrow checker is a constant reminder that "oops, I might have just tried to make a CVE right there."

                That you must structure a Rust program of any complexity around memory safety is a constant reminder of what things are and are not safe to do. It's not cognitively free, to the frustration of many people new to Rust. So would gently push back on the idea that programming in Rust leads to laziness. Most languages do not complain at all - in C, you only get interested in safety if you get interested in safety.

                I'd also hesitate to call any bug embarrassing, unless it was my own. We've all made some whoppers. These are process failures.

                G 1 Reply Last reply
                0
                • tdelmas@mamot.frT tdelmas@mamot.fr

                  @bagder Yes. But with C, you have to, first and foremost, focus on memory safety mistakes, because their effect can bypass almost all security implemented. With that out of the way, it really helps to focus on other mistakes.

                  bagder@mastodon.socialB This user is from outside of this forum
                  bagder@mastodon.socialB This user is from outside of this forum
                  bagder@mastodon.social
                  wrote last edited by
                  #9

                  @tdelmas yes, and C has existed as a real working option for decades, while memory safe alternatives have not...

                  jwalzer@infosec.exchangeJ 1 Reply Last reply
                  0
                  • bagder@mastodon.socialB bagder@mastodon.social

                    @tdelmas yes, and C has existed as a real working option for decades, while memory safe alternatives have not...

                    jwalzer@infosec.exchangeJ This user is from outside of this forum
                    jwalzer@infosec.exchangeJ This user is from outside of this forum
                    jwalzer@infosec.exchange
                    wrote last edited by
                    #10

                    @bagder @tdelmas

                    So the rust-rewrite will then be called „rurl“ I assume? Or „gurl“ in golang?

                    larsmb@mastodon.onlineL 1 Reply Last reply
                    0
                    • jwalzer@infosec.exchangeJ jwalzer@infosec.exchange

                      @bagder @tdelmas

                      So the rust-rewrite will then be called „rurl“ I assume? Or „gurl“ in golang?

                      larsmb@mastodon.onlineL This user is from outside of this forum
                      larsmb@mastodon.onlineL This user is from outside of this forum
                      larsmb@mastodon.online
                      wrote last edited by
                      #11

                      @jwalzer @bagder @tdelmas Given how extensive the test suite and docs are it is actually surprising nobody has burned the tokens to reimplement / launder it in Rust as a drop-in replacement.

                      1 Reply Last reply
                      0
                      • bagder@mastodon.socialB bagder@mastodon.social

                        *Zero* out of the six pending #curl CVEs are C mistakes. They are all logical mistakes that would have happened anyway even if we had used another language.

                        icing@chaos.socialI This user is from outside of this forum
                        icing@chaos.socialI This user is from outside of this forum
                        icing@chaos.social
                        wrote last edited by
                        #12

                        @bagder It would have been harder in Prolog.😌

                        kiskae@hachyderm.ioK 1 Reply Last reply
                        0
                        • bagder@mastodon.socialB bagder@mastodon.social

                          *Zero* out of the six pending #curl CVEs are C mistakes. They are all logical mistakes that would have happened anyway even if we had used another language.

                          lennybacon@infosec.exchangeL This user is from outside of this forum
                          lennybacon@infosec.exchangeL This user is from outside of this forum
                          lennybacon@infosec.exchange
                          wrote last edited by
                          #13

                          @bagder See, Daniel, couldn’t you show a bit more engagement in putting the bugs where the public expects them? Call it expectation management…

                          1 Reply Last reply
                          0
                          • bagder@mastodon.socialB bagder@mastodon.social

                            *Zero* out of the six pending #curl CVEs are C mistakes. They are all logical mistakes that would have happened anyway even if we had used another language.

                            jefftp@hachyderm.ioJ This user is from outside of this forum
                            jefftp@hachyderm.ioJ This user is from outside of this forum
                            jefftp@hachyderm.io
                            wrote last edited by
                            #14

                            @bagder If I'm understanding you correctly... we need a programming language that doesn't allow the programmer to make logical mistakes?

                            🤔 A programming language that doesn't follow logic...

                            Are you re-writing curl in COBOL?

                            1 Reply Last reply
                            0
                            • levitte@mastodon.nuL levitte@mastodon.nu

                              @bagder @tdelmas
                              Nah. Rewrite it all in Common Lisp. No mistakes can happen then...

                              corpsmoderne@mamot.frC This user is from outside of this forum
                              corpsmoderne@mamot.frC This user is from outside of this forum
                              corpsmoderne@mamot.fr
                              wrote last edited by
                              #15

                              @levitte @bagder @tdelmas 💯 . You just have to be extra careful when you write this (do-curl) macro 😬

                              1 Reply Last reply
                              0
                              • tdelmas@mamot.frT tdelmas@mamot.fr

                                @bagder You know that's not completely true. They may have happened, yes.

                                But with a finite time to write and review the code, all the time taken focusing on avoiding "C mistakes" could have been used focusing of the logic instead.

                                (Also, languages with stronger types do provide states and types encapsulation that can help avoid some types of logic mistakes)

                                A This user is from outside of this forum
                                A This user is from outside of this forum
                                amoshias@esq.social
                                wrote last edited by
                                #16

                                @tdelmas @bagder which language doesn't have the possibility of mistakes?

                                1 Reply Last reply
                                0
                                • tdelmas@mamot.frT tdelmas@mamot.fr

                                  @bagder You know that's not completely true. They may have happened, yes.

                                  But with a finite time to write and review the code, all the time taken focusing on avoiding "C mistakes" could have been used focusing of the logic instead.

                                  (Also, languages with stronger types do provide states and types encapsulation that can help avoid some types of logic mistakes)

                                  thradams@social.vivaldi.netT This user is from outside of this forum
                                  thradams@social.vivaldi.netT This user is from outside of this forum
                                  thradams@social.vivaldi.net
                                  wrote last edited by
                                  #17

                                  @tdelmas @bagder we can also say that C saves time in may cases. (compiling time , time updating tools, time updating code, time learning, time fixing build problems, etc…)

                                  1 Reply Last reply
                                  0
                                  • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                    @floooh @bagder @tdelmas

                                    As a Rust programmer who started in C and knows all about nasal demons, I find that the Rust borrow checker is a constant reminder that "oops, I might have just tried to make a CVE right there."

                                    That you must structure a Rust program of any complexity around memory safety is a constant reminder of what things are and are not safe to do. It's not cognitively free, to the frustration of many people new to Rust. So would gently push back on the idea that programming in Rust leads to laziness. Most languages do not complain at all - in C, you only get interested in safety if you get interested in safety.

                                    I'd also hesitate to call any bug embarrassing, unless it was my own. We've all made some whoppers. These are process failures.

                                    G This user is from outside of this forum
                                    G This user is from outside of this forum
                                    goedelchen@mastodontech.de
                                    wrote last edited by
                                    #18

                                    @gloriouscow @floooh @bagder @tdelmas "So would gently push back on the idea that programming in Rust leads to laziness." The question was, whether there is an overconfidence syndrome, not laziness.

                                    IMHO, the claim "A language empowering everyone to build reliable and efficient software" is ... uhm... optimistic.

                                    gloriouscow@oldbytes.spaceG 1 Reply Last reply
                                    0
                                    • G goedelchen@mastodontech.de

                                      @gloriouscow @floooh @bagder @tdelmas "So would gently push back on the idea that programming in Rust leads to laziness." The question was, whether there is an overconfidence syndrome, not laziness.

                                      IMHO, the claim "A language empowering everyone to build reliable and efficient software" is ... uhm... optimistic.

                                      gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                      gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                      gloriouscow@oldbytes.space
                                      wrote last edited by
                                      #19

                                      @goedelchen @floooh @bagder @tdelmas

                                      Fair point, my interpretation of overconfidence was that it leads to laziness, but that was indeed not the original point. If you feel something is protecting you, you drop your personal vigilance, vigilance takes effort, thus avoiding effort being a form of laziness.

                                      Maybe a bit of a leap, but it's my brain and I have to live in here.

                                      gloriouscow@oldbytes.spaceG ahltorp@mastodon.nuA 2 Replies Last reply
                                      0
                                      • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                        @goedelchen @floooh @bagder @tdelmas

                                        Fair point, my interpretation of overconfidence was that it leads to laziness, but that was indeed not the original point. If you feel something is protecting you, you drop your personal vigilance, vigilance takes effort, thus avoiding effort being a form of laziness.

                                        Maybe a bit of a leap, but it's my brain and I have to live in here.

                                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                        gloriouscow@oldbytes.space
                                        wrote last edited by
                                        #20

                                        @goedelchen @floooh @bagder @tdelmas

                                        As for that quote, optimistic as it may be, there's a kernel of truth to it. There are entire classes of vulnerability that are just not really feasible to create in Rust without an unsafe block or really going out of your way to Find Out.

                                        My boldest claim for Rust would be, if you selected some random programmer of indeterminate skill and assigned them the task of writing a file parser that everyone on earth will use, I would absolutely pray they write it in Rust.

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

                                          @bagder It would have been harder in Prolog.😌

                                          kiskae@hachyderm.ioK This user is from outside of this forum
                                          kiskae@hachyderm.ioK This user is from outside of this forum
                                          kiskae@hachyderm.io
                                          wrote last edited by
                                          #21

                                          @icing @bagder reality is sadly non-exhaustive

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups