- cross-posted to:
- pulse_of_truth@infosec.pub
- FizzyOrange ( @FizzyOrange@programming.dev ) 39•6 months ago
Seems a bit clickbaity to me. It’s a flaw in Windows/cmd.exe, not Rust. Rust is just called out because it tries to emulated proper argument passing on Windows (and didn’t get it perfectly right). All languages are affected by this but most of them just throw their hands in the air and say “you’re on your own”:
- 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)
It’s also extremely unlikely that you’d be running a bat script with untrusted arguments on Windows.
- porgamrer ( @porgamrer@programming.dev ) 20•6 months ago
I mean, let’s be real, Rust is really called out because it causes high drama between C devs and Rust advocates, which drives engagement.
It’s probably all kicking off in about 10 different comment sections right now
- thingsiplay ( @thingsiplay@beehaw.org ) 31•6 months ago
- eveninghere ( @eveninghere@beehaw.org ) 26•6 months ago
In February, the White House Office of the National Cyber Director (ONCD) urged technology companies to adopt memory-safe programming languages like Rust.
My comment is somewhat unfair, but WH is not the right body to make this kind of recommendation.
- JustBrian7872 ( @JustBrian7872@feddit.de ) 12•6 months ago
And the problem is about executing programs in windows. This is not about memory-safety.
A bunch of other languages are affected as well as noted by @colonial@lemmy.world.
- thingsiplay ( @thingsiplay@beehaw.org ) 11•6 months ago
Why not? I mean they are right. Adopting memory safe languages is a good step forward, because it would eliminate bunch of mistakes before they happen. And the White House does not recommend Rust only, but a memory-safe language, something like Rust or something different. I wish my government would do the same.
- notfromhere ( @notfromhere@lemmy.ml ) 6•6 months ago
Who would be then, Department of Defense, NSA, CIA, FBI, Department of Homeland Security? Aren’t all those the same body (executive) as White House of the National Cyber Director? Is your problem with having White House in the name?
- MachineFab812 ( @MachineFab812@discuss.tchncs.de ) 7•6 months ago
Those agencies are under the executive branch, and its been made very clear in the past that they prefer sneaking in backdoors to valid best practices.
The NSA sabotaging the Elliptic Curve method of random number generation used in the RSA algorithm comes to mind. They would otherwise be THE experts to trust, but lets look at the others:
FBI - Waco, Ruby Ridge, planned to assassinate Martin Luther King and so many others. CIA - promotes fascism internationally, causing all sorts of chaos in Latin America and the Middle East. Ever wonder how Komeni’s faction overthrew the Shah? The CIA decided he had gone soft.
Germany is so trusting of the US on cyber-security measures that their government has been trying to ditch Windows for over a decade.
TL;DR: In the US, government experts do NOT have your personal security best interests at heart. They can and will use any dirty trick possible to spy on and control both our own citizens and those of other countries. Last authories that anyone should trust.
- onlinepersona ( @onlinepersona@programming.dev ) English19•6 months ago
At least it’s not a segfault, buffer overflow, or whatever else plagues C/C++ programs and is not easy to detect.
Anti Commercial AI thingy
- thingsiplay ( @thingsiplay@beehaw.org ) 24•6 months ago
But it got a 10/10 on the scoring system by Github.
The issue isn’t actually too much related to the Rust core language itself, but rather how they handle scripts on Windows platform. So if you don’t have a Windows program that runs Batch scripts, then it doesn’t matter to you. I wonder how common it is to run Batch scripts in Rust?
- TehPers ( @TehPers@beehaw.org ) English8•6 months ago
if you don’t have a Windows program that runs Batch scripts with untrusted arguments
This only matters when running the scripts with user inputs passed as arguments to the command, which I can’t imagine being remotely common at all.
- tatterdemalion ( @tatterdemalion@programming.dev ) 6•6 months ago
I don’t think my company uses batch scripts anywhere, but if they did, it would probably be in the app installer for Windows or something.
- Sekoia ( @Sekoia@lemmy.blahaj.zone ) 13•6 months ago
Also, the reason this is a CVE is because Rust itself guarantees that calling commands doesn’t evaluate shell stuff (but this breaks that guarantee). As far as I know C/C++ makes no such guarantee whatsoever.
- Buttons ( @Buttons@programming.dev ) English10•6 months ago
Our bug is their status quo.
- drjkl ( @drjkl@programming.dev ) 9•6 months ago
I’ve run into bizarre behavior with windows command lines plenty of times before, but I’d never put all the pieces together and realized that:
a) windows really does pass around unadorned monolithic strings containing the entire command line of an executed command, and
b) there’s no parsing standard for command lines in windows
sigh, windows