Linux Kernel Rust Code Sees Its First CVE Vulnerability

69 points by weinzierl


jcspencer

I’ve found a useful side-effect of Rust in the kernel to be the resulting documentation changes that better define the behaviour of other kernel subsystems - kind of like how adding new architectures to the kernel helps strengthen abstractions/assumptions during the development of new bindings.

In this case, a subsequent documentation-update commit rust: list: add warning to List::remove docs about mem::take helped clarify the linked list footgun that led to this bug.

Sidenote: I personally found @lina’s amazing work in the DRM subsystem fascinating to follow, as pushing invariants into the Rust type system unearthed many invariants that were not previously explicitly documented.

weinzierl

The article is a bit thin, so here is the mailing list thread.

diktomat

Note the other 159 kernel CVEs issued today for fixes in the C portion of the codebase

social.kernel.org:~gregkh

Also:

the offending issue just causes a crash, not the ability to take advantage of the memory corruption, a much better thing overall