• lazynooblet@lazysoci.al
    link
    fedilink
    English
    arrow-up
    13
    ·
    7 months ago

    Both the article and the CVE description point to how Rust handles escaping for CMD arguments. If it’s not a Rust issue then can you explain?

    • 5C5C5C@programming.dev
      link
      fedilink
      English
      arrow-up
      11
      ·
      7 months ago

      Because this is the status of the bug across the standard libraries of various languages, per this article and others:

      • Erlang (documentation update)
      • Go (documentation update)
      • Haskell (patch available)
      • Java (won’t fix)
      • Node.js (patch will be available)
      • PHP (patch will be available)
      • Python (documentation update)
      • Ruby (documentation update)

      Notably C and C++ are missing from this list because their standard libraries don’t even offer this capability. Half of these standard libraries are responding to the issue by just warning you about it in the function documentation. Rust is one of the few that actually prevents the attack from happening.

      The original BatBadBut bug report used JavaScript to illustrate the vulnerability.

    • baru@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      7 months ago

      I explained it elsewhere, but basically: an API that needs undocumented escaping doesn’t immediately make you think that the API has huge issues?

      • vanderbilt@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        WinAPIs are rife with weirdness like this that has stuck around for backward compatibility reasons. The day MS finally kills win32 will be the day Windows’ security improves tenfold.

    • rottingleaf@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 months ago

      If you read it more attentively, no, it does say that.

      I dislike all the “rewrite it in Rust to be secure” bros, but not such a case here.