r/cpp_questions • • 3d 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

24 comments sorted by

16

u/AKostur 3d ago

No clue what you’re talking about.

8

u/TheThiefMaster 3d ago

They mean this: https://en.wikipedia.org/wiki/Black_October_(information_security)

And no, it didn't do much to C++. AFAIK none of the vulnerabilities were in C++ code, mostly C and bad keys

5

u/Outrageous-Box3338 3d ago

I’m surprised that this October already has its own special name so soon. I didn’t even know this name before.

3

u/tcpukl 3d ago

What a stupid name. Never heard of this either before. But exploits are always being found. It's stupid Oct has such a name.

5

u/Ok_Beginning_9943 3d 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.

1

u/tcpukl 3d ago

Yeah voluntariness are always being found in all systems and languages.

5

u/mredding 3d 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 unsafe Rust 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?

2

u/Zde-G 3d ago

So C++ specifically doesn't rank high on the list as a source of exploits and fault.

Who cares? C++ is “memory unsafe”, Rust is “memory safe”, ergo we should replace perfectly working C++ code with Rust… 3-2-1… start!

Rust is now declared the new panacea for the vulnerabilities means we would get it shoved everywhere. Where it would work and where it wouldn't work, too.

Which is sad, really, because people who developed (and develop!) Rust know too well that Rust is good, but it's definitely not a panacea.

But that ship have sailed: there would be push for Rust, there would be disappointments, when Rust would prove to be good yet not perfect… recall Java, C#, etc.

P.S. Still have no idea what to think about the whole thing.

4

u/flyingron 3d 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.

6

u/swingbozo 3d 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

1

u/UnicycleBloke 3d ago

+1. I've only worked on a single Rust project but it demonstrated beyond any shadow of a doubt that terrible code could be written in Rust just as much as any other language. The original developers were clearly not very good.

I've always found that designing and writing for clarity and maintainability is much more important and tricky than the relatively straightforward task of avoiding memory faults. I liked the Rust language itself, but I'm decades more familiar with C++ and there is no compelling reason to move away from it.

3

u/swingbozo 3d ago

They shitcanned a fully capable fully working backend written in C# to rewrite the entire thing in Rust, tossing out almost a year of development because Rust was "so much better (tm)." Let's just say this was a venture capital funded company that everyone was milking to death. It imploded after a few years of this. Now they make money fleecing stupid people by renting them high end PC's.

I was never a fan of venture capital funded companies. This experience convinced me my gut feeling was completely correct.

2

u/FancySpaceGoat 3d ago edited 3d 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.

1

u/BoopyDog 3d ago

What about when c++ profiles become standard? I'm sure they will make a difference.

2

u/FancySpaceGoat 3d ago edited 3d ago

In the sense of making C++ *foundational*? No, it still doesn't have C's greatest strength: the dirt-simple ABI.

In the sense of making it a better mechanism than rust at addressing the safety issue? I'm not a believer, personally. Anything that involves **redundant** bounds checking will invariably face pressure to be replaced by something that doesn't have to deal with belts-and-suspenders.

2

u/tcpukl 3d ago

Why do you think it's anything to do with c++?

1

u/no-sig-available 3d ago

They might believe that more people using Rust means fewer people using C++. That the world is a zero sum game.

2

u/WorkingReference1127 3d ago

What Rust protects you from is a subset of all the possible causes of vulnerabilities. And that's not a bad thing. But it's a subset. Rust is not a magic bullet and it's very possible to write unsafe code in Rust (and I don't mean unsafe code); as well as code which is broken and logically flawed.

1

u/montymole123 3d ago

Most hacks are actually social engineering eg Binance theft due to a fake job interview on dev laptop

1

u/Affectionate-Soup-91 3d ago

Software written in C misbehaves. Oh C/C++ problem; let's evict C++ from the world already. Nah, C is too foundational and it's so simple, we keep them. As always, only C++ is to blame here. :S

-1

u/FckXFckMusk 3d ago

Rust is a Commercial push, so ownership transfers to the corporates...

3

u/_DESTRUCTION 3d ago

Is there truth to that? Can you explain further? 

I’m not being belligerent, i just know very little of rust, its history or its origins - just keep fucking hearing about it when I read interesting ‘to me’ things about c++. 

It’s like I can’t read about c++ for more than 10 minutes before rust comes up..

1

u/Full-Spectral 3d ago

Everything these days is about transferring ownership of the digital landscape to large corporations. But that has no more to do with Rust than any other language.

Rust has only recently gotten onto the RADAR screens of large companies, which it did by being a superior language, not because of corporate greed. The companies adopting it are either companies that actually still write code and are tired of the endless foot-guns in C++, or in some cases slop coding companies and Rust just happens to be useful for that because it's a very strict language.

Many of us adopted Rust years ago, in my case after writing well over a million lines of commercial C++, because it's just a much more modern, consistent, safe language.

1

u/InternationalFee3911 4h ago

So true! Though Rust stuff often being MIT licenced might be part of Ubuntu's move from GPL Gnu utils to uutils. I have mixed feelings on whether that creates a fairer world.