News for hackers. Stuff that matters.
Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by treyd on Wednesday December 17, 2025 @01:52PM (#46303800)
And that is fine, because those upstream deps can locally ensure that those sections are correct without any risk that some unrelated code might mis-safely use them unsafely. There is an actual rigorous mathematical proof of this. You have no such guarantees in C/C++.
Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by informa23 on Wednesday December 17, 2025 @02:01PM (#46303933)
EDIT: Hacker News has limited my ability to respond. Please keep in mind that Rust has a large number of active fans, who may have biases for whatever reasons.

What?

Even the Rust standard library has had UB.

https://materialize.com/blog/rust-concurrency-bug-unbounded-...

And a bug in one crate can cause UB in another crate if that other crate is not designed well and correctly.

https://zackoverflow.dev/writing/unsafe-rust-vs-zig/

Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by treyd on Wednesday December 17, 2025 @02:11PM (#46304089)
> And a bug in one crate can cause UB in another crate if that other crate is not designed well and correctly.

Yes! Failure to uphold invariants of the underlying abstract model in an unsafe block breaks the surrounding code, including other crates! That's exactly consistent with what I said. There's nothing special about the stdlib. Like all software, it can have bugs.

What the proof states is that two independently correct blocks of unsafe code cannot, when used together, be incorrect. So the key value there is that you only have to reason about them in isolation, which is not true for C.

Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by aw1621107 on Wednesday December 17, 2025 @02:07PM (#46304034)
I think you're misunderstanding GP. The claim is that the only party responsible for ensuring correctness is the one providing a safe API to unsafe functionality (the upstream dependency in GP's comment). There's no claim that upstream devs are infalliable nor that the consequences of a mistake are necessarily bounded.
Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by dijit on Wednesday December 17, 2025 @02:06PM (#46304010)
Those guys were writing a lot of unsafe rust and bumped into UB.

I sound like an apologist, but the Rust team stated that “memory safety is preserved as long as Rusts invariants are”. Feels really clear, people keep missing this point for some reason, almost as if its a gotcha that unsafe rust behaves in the same memory unsafe way as C/C++: when thats exactly the point.

Your verification surface is smaller and has a boundary.