• rational_lib@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    Imagine if there was a hack so bad that it caused everyone to become unable to develop in C and C++.

    Classic “let’s just make the cure worse than the disease” mindset among security enthusiasts.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      2 days ago

      Imagine if there was a hack so bad that it caused everyone to become unable to develop in C and C++.

      Well, there is one that will imply you can only develop using anything that you have bootstrapped yourself, using hardware that you have designed and manufactured yourself, using tools that you have designed and manufactured yourself, using tools that you have designed and manufactured yourself …

      … with your own bare hands.

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    But there is context to it:

    The report on Product Security Bad Practices warns software manufacturers about developing “new product lines for use in **service of critical infrastructure or [national critical functions] **NCFs in a memory-unsafe language (eg, C or C++) where there are readily available alternative memory-safe languages that could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.”

    It’s for new products that are very important to critical infrastructure and need to be safe as possible. The article writer seem not to be aware of this context:

    Take Rust in Linux, for example. Even with support from Linux’s creator, Linus Torvalds, Rust is moving into Linux at a snail’s pace.

    Because Linux is the biggest software in the entire world and they do lot of stuff their own way. Rust is integrated slowly for future new projects. It makes sense to move in snail pace. The government doesn’t suggest the Linux project to stop using C entirely. The government “recommends” to start new projects in memory safe languages, if it is a critical software. That makes sense to me.

    You see, people who’ve spent years and sometimes decades mastering C don’t want to master the very different Rust. They don’t see the point.

    No, totally wrong. C programmers in Linux do not NEED to learn or master Rust. They just need to cooperate. The problem is, that some C programmers refuse to cooperate with Rust. They just want Rust to disappear. That has nothing to do with mastering the language. They refuse to make changes to their C code, so it can cooperate with Rust code via bindings.

    After all, they can write memory-safe code in C, so why can’t you?

    Nonsense argument, and false too. If that was the case, why do we have memory safe languages? Clearly people make mistake, old and new. Besides Linux is not the only software in the world.

    Converting existing large codebases to memory-safe languages can be an enormous undertaking.

    Nobody says old code should be rewritten in Rust. Neither the government, nor the Rust programmers in Linux suggest that. It’s not about rewriting code in memory-safe languages, its about new projects.

    Either this article is a misrepresentation or misunderstanding. Or I misunderstand the article or government. I don’t know anymore…

    • TheFogan@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Take Rust in Linux, for example. Even with support from Linux’s creator, Linus Torvalds, Rust is moving into Linux at a snail’s pace.

      Because Linux is the biggest software in the entire world and they do lot of stuff their own way. Rust is integrated slowly for future new projects. It makes sense to move in snail pace. The government doesn’t suggest the Linux project to stop using C entirely. The government “recommends” to start new projects in memory safe languages, if it is a critical software. That makes sense to me.

      Doubly so… Don’t care what the language is, or what the advantages are… Even if there’s a considerable security advantage to a new language… There’s no such thing as a language that’s advantages outweigh the security risks of rushed development to convert decades of tested code.