Now to get people to use them it's an issue.
The actual good news is that we have multiple mature languages that entirely remove the need for users to configure and run fuzzers and sanitizers and remember to always obey arcane rules in order to avoid memory corruption.
We’ve been encouraging people to walk, not run, to the exits and switch from C and C++ to memory-safe equivalents. Now it is clear that the time for walking is over and the remaining holdouts should be at the very least jogging if not running.
I work mostly in compiled managed languages, yet have to keep my C and C++ skills sharp, as there is always this or other scenario that requires something written in them, like the runtimes or compiler tools I depend on, because bootstraping is too much work for most implementors.
> Let's say you rewrite your terminal emulator in Rust from C or C++; you'll first undo decades of bug fixes, compatibility decisions, quirks, etc. which you WILL have to deal with eventually. This essentially puts you back at least a decade, because these issues take users using the software to point out to you before they're fixed. The only benefit of this whole game being that you get memory safety. These teams are never the original teams, which is the source of the problem. A rewrite can only succeed if it's a result of all the learned failures and shortcomings of the original, otherwise it's bound to repeat every single mistake and add more on top.
> And you don't even deliver memory safety to the users of the original this way, because people won't use the rewrite, because it's buggy, incompatible, etc.
I would prefer something be impossible by construction.
There are memory-safe options with little/no performance overhead compared to C/C++.
That's not what I said, don't put words in my mouth.
And yes, programmers need to do better. That's not the answer, but the quality of code that the average programmer outputs is abysmal and could be a lot better simply by giving a shit :D
You can avoid a lot of memory issues in C++ already, yet so many people refuse to use these features (like std::array, boost::synchronized_value, std::unique_ptr). If we used these, we wouldn't solve all memory issues, but we would surely have less.
If you interpret me saying "we should do better" as "we don't need Rust because programmers just need to not make mistakes" then I think the ball is in your court.
(Correct me if I'm wrong!)
That's why hiding the POC still helps a bit, because any model probably will require quite a bit of wall clock time to actually build one itself. Then making that work on e.g. a running gitlab instance with other traffic... much harder yet again I'd assume since that should alter memory state without you having control over it.
Still if someone builds an exploit with even 1% success rate they just need to run it on enough instances in parallel and will eventually break through some of them probably.
Of course I'm not sure how much it counts to be "using a memory safe language" when you have to call put to unsafe code anyways. I.e. just because the library you'd like to use is C but the rest of your project is Rust doesn't mean you're really using a me ory safe language, it means you're sometimes using one. We have a long way to go before environments allow using memory safety fully I think.
PS Its the height of irony that the layer protecting Java webservices IS less secure than the Java webservice itself.
PPS The Java memory model is just superior to Rust's in every way...deal with it.
You forgot the interpreter itself. Good luck.
I don't see it. In Safe Rust we can't write a Data Race so we get SC/DRF because we know we don't have a data race. If we write unsafe Rust we do need to be careful not to break the rules and introduce a data race.
In Java we do not get such a promise at all, any of our code might race. However, if we do lose Sequential Consistency we still have defined behaviour, we probably no longer understand how our program behaves (if it's not trivial) but we can say e.g. "I didn't write any code to delete the database" and so conclude it doesn't delete the database.
This doesn't seem like a clean win. I can see valuing either proposition more, but "in every way" I don't get that.
Now, in web-facing systems, the biggest concern is the low-level crypto libraries, which need to be written in assembly to avoid timing attacks. These (and related libraries) have seen multiple security advisories in the past year, some related to unsafe (I think?) and some related to logic errors. But overall, those advisories have mostly been lower priority, or affected mostly niche use cases.
If you only have a small amount of unsafe code, then it's possible to audit it more aggressively. And there's only a limited amount of space for bugs. So what I would expect for Rust is a trickle of security bugs, many of them niche or low severity, that slows down with time.
For an example of the latter (LLVM is just nonsense): LLVM still today has a bug found years ago where pointer provenance (a legitimate but hard to think about idea for optimising compilers) accidentally leaks into integers, and so LLVM can end up with two integers a, b which it believes are not equal and yet a - b == 0. Boom.
... against str::to_lowercase the Rust function which has a single line of unsafe code, with a two line rationale provided to explain why it's OK to do this. As a subject matter expert I agree with the rationale. LGTM.
> It's important to note that Java, like Rust, is generally seen as a memory safe language. But it has bits of assembly, just like Rust has unsafe blocks, to handle some operations.
And according to sources like CISA and the NSA [1], Java is considered memory safe. Furthermore, Rust has been found to have some memory safety issues as well [2]. I think the point to get across is that yes, Rust can help eliminate a very large set of memory safety bugs, but it's prone to issues that other generally considered memory safe languages also have: at some point to do useful work there are going to be unsafe operations. The surface area might be much smaller, so you're likely better off using a memory safe language if you can help it, but it's not a panacea for having layers of security, especially since it means any issue found is likely to affect a large swath of code written in the language because it's in a load bearing area of the language ecosystem.
[1]: https://www.nsa.gov/Press-Room/Press-Releases-Statements/Pre...
[2]: https://www.microsoft.com/en-us/security/blog/2026/11/09/for...
If so, those are built on unsafe operations internally.
Safety is a lot more complicated than "whether it is in an unsafe block of code in Rust". If you insist that an unsafe primitive can not be handled well enough to become "safe" by some definition of safe then you collapse the entire programming language hierarchy into "everything is completely unsafe". Which may, from a certain point of view, be true, but isn't a particularly useful classification scheme.
No, it's not. A relatively common case for unsafe in Rust is in data structures. The data structures in the Java runtime are all written in Java and has almost no use of unsafe (there might be a few, but not becsause of language limitation, but because of initialisation order).
As for the JVM, much of it is a compiler. It doesn't matter what language it's written in, as it generates machine code. Indeed, the vulnerability disclosed yesterday was in a compiler intrinsic, but those are just as common in Rust.
Other than that, the other big piece in the JVM is memory management, and it does, indeed, use C and C++ for memory management, but Rust also uses C (the various implementations of malloc/free in whatever runtime the Rust program is using; BTW, some popular malloc/free implementations are almost as big as Java's most complicated GC).
I'm pretty sure that's incorrect by a wide margin, and that all non-nop GCs java has are as large as at least some popular allocators.
Assembly provides no timing guarantees. You will want something higher level built on top of assembly that can guarantee it for a specific processor.
This is silly. Rust also has tooling for dealing with unsafe - tools for proving unsafe code, tools for verifying unsafe code, tools for fuzzing it, etc.
Java, and other languages like it, often drop into unsafe code where it's far weirder and less supported because they have to because the languages are too slow to do the work they want to do.
And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.
No, that's not been the case for a while, at least since the introduction of VarHandles and FFM (which is why Unsafe is now in the process of being removed altogether).
> And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.
No, that's also inaccurate. The "massive runtime" is largely a compiler (and it doesn't matter what language that's in), and memory management, where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).
Unsafe is still plenty prevalent in Java, nor is the use of C++ libraries.
> sometimes with more aggressive optimisations and sometimes with less aggressive ones.
Yes, well, that's some handwaving.
> Unsafe mostly used to be used for certain memory operations before VarHandles and FFM.
Yes. It is still very prevelant.
> No, that's also inaccurate. The "massive runtime" is largely a compiler (and it doesn't matter what language that's in), and memory management, where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).
Ridiculous. "largely a compiler" - it's a JIT compiler, as in it's a runtime compiler that allocates executable code at runtime and then runs it. (a) Of course it matters what language it's in (b) JITs are an incredible source of security issues and have their own set of mitigations that have to be applied.
> where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).
A ridiculous comparison.
It really does, though. Perhaps you're unfamiliar?
> Unsafe is still plenty prevalent in Java, nor is the use of C++ libraries.
My statement was that unsafe is much more prevalent in Rust than in Java, and that is true.
> Yes, well, that's some handwaving.
I'm sorry that I can't teach you principles of compilation here, but feel free to dig deeper.
> Yes. It is still very prevelant.
Much less than in Rust.
> Ridiculous... A ridiculous comparison.
You don't sound like either a runtime or compiler engineer at all, or you wouldn't have found any of this ridiculous in the least (or news). In that case, I hope that telling you that what I wrote was true might enrage you enough to learn more about these subjects, and perhaps our community will have grown by another member.
You won't be specific so now you're putting me in a position to have to build your argument for you. It's frustrating because the conversation is already stupid. Java is a language so calling it compiled or interpreted or AOT or JIT is already a mistake, those are implementation properties of how it is deployed.
The massively most popular implementations rely massively on JIT, even if they have varying levels of AOT support.
This is so obviously different from actual AOT languages. Hence having to call it AOT when it's Java.
> My statement was that unsafe is much more prevalent in Rust than in Java, and that is true.
That's an empirical claim. You can go ahead and support it.
> Much less than in Rust.
Riiiight. No one uses Netty, right????? They had such an easy job ditching Unsafe, right??????
> You don't sound like either a runtime or compiler engineer at all, or you wouldn't have found any of this ridiculous in the least (or news). In that case, I hope that telling you that what I wrote was true might enrage you enough to learn more about these subjects, and perhaps our community will have grown by another member.
And I recognize your name well enough that you don't know much of anything.
If any single byte overflow can be converted into an RCE with minimal human effort then we have no choice but to prove the whole software stack is memory safe.