News for hackers. Stuff that matters.
Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by n2d4 on Wednesday December 17, 2025 @02:12PM (#46304113)
I recommend you read Greg Koah-Hartman's thread instead of this article: https://social.kernel.org/notice/B1JLrtkxEBazCPQHDM

    > Rust is is not a "silver bullet" that can solve all security problems, but it sure helps out a lot and will cut out huge swatches of Linux kernel vulnerabilities as it gets used more widely in our codebase.
    
    > That being said, we just assigned our first CVE for some Rust code in the kernel: https://lore.kernel.org/all/2025121614-CVE-2025-68260-558d@gregkh/ where the offending issue just causes a crash, not the ability to take advantage of the memory corruption, a much better thing overall.

    > Note the other 159 kernel CVEs issued today for fixes in the C portion of the codebase, so as always, everyone should be upgrading to newer kernels to remain secure overall.
Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by jackrabbit1997 on Wednesday December 17, 2025 @02:28PM (#46304323)
> > That being said, we just assigned our first CVE for some Rust code in the kernel: https://lore.kernel.org/all/2025121614-CVE-2025-68260-558d@g... where the offending issue just causes a crash, not the ability to take advantage of the memory corruption, a much better thing overall.

That indicates that Greg Koah-Hartman has a very poor understanding of Rust and the _unsafe_ keyword. The bug can, in fact, exhibit undefined behavior and memory corruption.

His lack of understanding is unfortunate, to put it very mildly.

Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by n2d4 on Wednesday December 17, 2025 @02:54PM (#46304650)
What are some compiler flags that would compile the code such that an attacker could take advantage? And what would the attack be?

Or is this just a theoretical argument, "it is hypothetically possible to create a technically-spec-compliant Rust compiler that would compile this into dangerous machine code"? If so it should still be fixed of course, but if I'm patching my Linux kernel I'd rather know what the practical impact is.

Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by aw1621107 on Wednesday December 17, 2025 @04:41PM (#46305899)
To play a bit of devil's advocate, I don't think the problem is necessarily with the compiler output. It's more that it's not always easy to definitively state the precise consequences of a particular issue, especially when it comes to memory safety-/UB-related issues. For example, consider this Project Zero writeup about using a single NUL byte buffer overflow as part of a root privilege exploit [0] despite some skepticism about whether that overflow was actually exploitable.

To be fair, I'm not saying that Greg KH is definitely wrong; I'm only willing to claim that in the general case observing crashes due to corrupted pointers does not necessarily mean that there's no ability to actually exploit said corruption. Actual exploitability will depend on other factors as well, and I'm far from knowledgeable enough to say anything on the matter.

[0]: https://projectzero.google/2014/08/the-poisoned-nul-byte-201...

Re:Linux Kernel Rust Code Sees Its First CVE Vulnerability by anonnon on Wednesday December 17, 2025 @06:27PM (#46307044)
> > Rust is is not a "silver bullet" that can solve all security problems, but it sure helps out a lot and will cut out huge swatches of Linux kernel vulnerabilities as it gets used more widely in our codebase.

Same thing is true about modern C++, and as an added bonus, it's far more straightforward to rewrite legacy C code into modern C++ than it is to rewrite it in Rust, and you can do so without compromising existing support for any architectures thanks to GCC (unlike Rust, which relies on LLVM-based rustc), yet there's still a baffling blanket ban on C++ in the kernel. I say "baffling," since it's unjustifiable on technical grounds, but it's easily explained as a mix of Linus by proxy (Greg) being too proud to walk back his infamous vituperative denunciation of the language (even though it's since evolved considerably), and Rust zealots being so numerous, motivated, organized, and also mentally and hormonally unstable enough that it's just not worth the effort to resist them. If C++ developers were the types to threaten self-harm when they didn't get their way, C++ would probably be in the kernel too.