Skip to content

How memory safety CVEs differ between Rust and C/C++

7.4 relevance
Score Breakdown
technical depth
8
novelty
7
actionability
6
community
8
strategic
7
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Memory safety CVE comparison between Rust and C/C++ directly addresses a key interest in software engineering trends.

Languages kobzol.github.io
Summary

A deep dive into how memory safety CVEs are reported and perceived differently between Rust and C/C++, using the curl library as a concrete example. The author demonstrates that calling curl_getenv(NULL) in C causes a segfault (a memory safety bug), yet no one would report it as a CVE because the caller is responsible for passing valid arguments. In Rust, the type system and borrow checker would make such an API misuse either a compile-time error or require explicit unsafe, shifting the burden of proof from the caller to the library author. This asymmetry explains why raw CVE counts between Rust and C/C++ are misleading: Rust's safety guarantees push vulnerability classes into the unsafe boundary, where they are more visible and harder to accidentally trigger.

Author

Kobzol's blog

More from Kobzol's blog →