🌘 Rust 與 C/C++ 在記憶體安全 CVE(常見漏洞與披露)上的差異解析
➤ 為什麼 Rust 的 CVE 比 C/C++ 看起來更「嚴苛」?
✤ https://kobzol.github.io/rust/2026/06/15/how-memory-safety-cves-differ-between-rust-and-c-cpp.html
本文探討了 Rust 與 C/C++ 在處理記憶體安全漏洞時的根本差異。作者指出,由於 C 與 C++ 語言本身的特性,許多因「使用不當」導致的記憶體錯誤(如傳入 NULL 指標)通常不被視為漏洞,僅被視為呼叫端的使用錯誤;反之,在 Rust 中,任何能透過「安全代碼(Safe Rust)」觸發記憶體錯誤的 API,都會被定義為該函式庫的「健全性漏洞(Soundness Bug)」。因此,Rust 的 CVE 標準遠比 C/C++ 嚴格,這也解釋了為何在比較兩者漏洞數量時,必須考量其背後截然不同的安全責任歸屬。
+ 這篇文章很好地釐清了為什麼 Rust 生態系對「安全性」的要求
#程式語言 #軟體安全 #Rust #CC++ #CVE
➤ 為什麼 Rust 的 CVE 比 C/C++ 看起來更「嚴苛」?
✤ https://kobzol.github.io/rust/2026/06/15/how-memory-safety-cves-differ-between-rust-and-c-cpp.html
本文探討了 Rust 與 C/C++ 在處理記憶體安全漏洞時的根本差異。作者指出,由於 C 與 C++ 語言本身的特性,許多因「使用不當」導致的記憶體錯誤(如傳入 NULL 指標)通常不被視為漏洞,僅被視為呼叫端的使用錯誤;反之,在 Rust 中,任何能透過「安全代碼(Safe Rust)」觸發記憶體錯誤的 API,都會被定義為該函式庫的「健全性漏洞(Soundness Bug)」。因此,Rust 的 CVE 標準遠比 C/C++ 嚴格,這也解釋了為何在比較兩者漏洞數量時,必須考量其背後截然不同的安全責任歸屬。
+ 這篇文章很好地釐清了為什麼 Rust 生態系對「安全性」的要求
#程式語言 #軟體安全 #Rust #CC++ #CVE
How memory safety CVEs differ between Rust and C/C++
CVE is a database used for categorizing and reporting security vulnerabilities in software. There are various kinds of vulnerabilities that can be reported. Some of them are caused simply by bugs in the program logic (like a recent CVE reported in Cargo), but some of the most nasty ones are caused by memory unsafety, which can easily lead to exploits. In this post I want to focus on the latter kind of CVEs, how they are reported, especially in libraries, and how it differs between Rust and C or C++.