abhibeckert ,

Once again this is not a Rust vulnerability.

This is a Windows vulnerability and Rust is simply the first set of tools to implement a workaround - since Microsoft can't do it without breaking backwards compatibility.

Somehow the narrative has turned into negative PR for Rust when in fact they are handling this vulnerability better than anyone else in the industry.

lazynooblet ,
@lazynooblet@lazysoci.al avatar

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 ,

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.

breadsmasher ,
@breadsmasher@lemmy.world avatar

"The Rust standard library did not properly escape arguments when invoking batch files (with the bat and cmd extensions) on Windows using the Command API,"

If the issue is caused by rust not escaping arguments, and fixed by rust properly escaping arguments, how is it not a rust issue?

baru ,

If the issue is caused by rust not escaping arguments

That Windows API is terrible. There isn't a way to have the escaping done for you. Further, there is not an API where you do not need to do the escaping. There is no documentation on what kind of escaping is needed.

It's not a Rust problem.

IsThisAnAI ,

That's 100% a rust problem. Trusting another system to sanitize your input is about the dumbest thing I've ever heard. Windows being shitty isn't an excuse for the language being shitty as well.

5C5C5C ,

Except it's actually an "Every language and library that provides this feature" problem because literally no one was aware that this sanitization problem even existed, and Rust is among the first to actually fix it.

5C5C5C ,

If the issue exists in the standard library of every language that provides this capability and Rust's standard library is the first to fix it, how is it a Rust issue?

It would be more accurate to say that it's an issue in almost every language EXCEPT Rust at this point.

The only reason it isn't being called a C or C++ issue is because their standard libraries don't even attempt to offer this capability. But you can bet that all sorts of C/C++ libraries that do offer this, like Qt, will also be having this issue.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines