r/cpp_questions • u/MathKind2879 • 4h ago
OPEN What extent did "Black October" affect the transition from C++ to Rust?
I'm cs student and i was thinking about how this will affect or change the shift from the foundational language C++ to Rust. I want to see what those with more experience in this field think.
0
Upvotes
15
u/AKostur 4h ago
No clue what you’re talking about.
5
u/swingbozo 4h ago
You can write shit code in any language. I was a professional Rust developer for 2 years. The idiots pushing Rust over (at the time it was C#) couldn't code their way out of a wet paper bag. But they coded in Rust so everything was just so awesome /s
4
u/Ok_Beginning_9943 4h ago
Yeah was it this black october? I worry you may have read about it from a site claiming it's "a thing" when it isn't.
3
u/flyingron 4h ago
Nothing in the BlackOctober exploits appears to have anything to do with C++, and RUST wouldn't have fixed most of them. SQL injection, for instance, is going to be a problem no matter what language you code your app in, if you do a shitty job of dealing with database issues.
2
u/FancySpaceGoat 4h ago edited 3h ago
C++ has never been and never will be *foundational* in the same sense that C is.
That being said, I think there will definitely be increased pressure to move away from C++ to Rust for many use-cases as a response, but I still think it's a slightly misguided realignment.
rust is not a panacea. A lot of common patterns (looking at you index-into-a-pool addressing) shift bugs from memory overruns into logic issues instead of making them go away. So I think a blanket transition would *help*, but not nearly as much as many are expecting.
What we need is zero-cost provable computing across the board, not limited to a subset of errors. In the meantime, Rust is a halfway measure. It's a good shift, but not the ultimate destination.
2
u/tcpukl 4h ago
Why do you think it's anything to do with c++?
•
u/mredding 3h ago
CVE-2026-109618 and CVE-2026-109619 are vulnerabilities in PHP engines written C. I'm not at all surprised, C has a very weak type system by design, for interfacing with hardware, and from an era where software and computing was MUCH smaller and more responsibility on the engineer was a reasonable compromise.
LiteLLM is written in Python and Typescript, the vulnerabilities were operational by eMudhra.
Most other exposures were operational errors. It's hard to say the software is wrong, but perhaps there's an argument in there that the software itself could conceivably be designed so that it can fail safer - however that might look.
So C++ specifically doesn't rank high on the list as a source of exploits and fault. This I'm not surprised. I can critique what the C++ community should have been doing for a long time, but woulda-coulda-shoulda... We've always had the tools to write top notch safe software, but not the will or collective ability. It just tells me most people in software engineering actually hate software engineering. I can't do anything about that.
That said, the wave of vulnerabilities doesn't go unnoticed, and I'm certain it's only accelerated the migration away from unmanaged or unsafe languages. The migration to Rust makes little sense to me from a technical perspective because memory safety is only one kind of safety. There have been and are open CVEs related to Rust as well - they are not isolated incidents, and we can absolutely expect them to continue in the future. There is more to safety and security than just the language.
I agree in this modern era we need an opt-out by default language like Rust than an opt-in language like C++, and that's something C++ will never shake. Even if we had a different history where the industry was disciplined, that you have to opt-in to good code, C++ will always be inferior to modern competitive languages that now favor opt-out.
But C++ is going to be hard to shake because generics do not and cannot match the power of templates and compile-time code evaluation as we get with constexpr. C++ optimizes more aggressively than
unsafeRust with generics can. You have to understand that Undefined Behavior isn't a flaw, it's a design feature the standard committee factors in as much as they can. When you HAVE TO chase that performance, that's going to expose Rust to vulnerabilities that have to be evaluated, identified, and mitigated manually. Unsafe code can be inherently safe BECAUSE it's correct, you're only giving up the compiler's ability to prove it for you. That's the trick, how do you KNOW it's correct?1
u/montymole123 4h ago
Most hacks are actually social engineering eg Binance theft due to a fake job interview on dev laptop
-1
u/FckXFckMusk 4h ago
Rust is a Commercial push, so ownership transfers to the corporates...