5 ms·
One would think that this would be fixed in the last five years?
by emperorcezar 4y ago
One would think that this would be fixed in the last five years?
- acaloiar 4y agoCertainly. What I don't believe is certain is that only one such vulnerability has ever existed and none exist in Rust today. It's not pedantic to differentiate between mitigating a thing and preventing a thing.
- hhda 4y agoYou can add `#![forbid(unsafe_code)]` to your codebase to avoid any unsafe Rust, which should prevent buffer overflows. Obviously it may make writing a codebase somewhat harder.
- usefulcat 4y agoWill that restriction also be applied transitively to all dependencies?
- hhda 4y agoFor that, I believe you need to use cargo-geiger[0] and audit the results. [0] - https://github.com/rust-secure-code/cargo-geiger https://github.com/rust-secure-code/cargo-geiger
- majewsky 4y agoNo. That kind of restriction cannot realistically be applied to any project above toy scale. The stdlib uses unsafe code to implement a large number of memory management primitives, because the language is (by design!) not complex enough to express every necessary feature in just safe code. Rust's intention is merely to limit the amount of unsafe code as much as possible.
- School-Cotton 4y agoNo, and in fact that would be impractical, because you can't do anything useful (e.g., any I/O whatsoever) without ultimately either calling into a non-Rust library or issuing system calls directly, both of which are unsafe.
- rurban 4y agoThe amount of reported and unfixed memory bugs in Rust went 10x more, not less in the last 5 years.
- Jweb_Guru 4y agoIf you believe you can find a memory unsafety vulnerability in this project's Rust code based on the existence of those bugs, feel free to do so.
- deleted 4y ago[deleted]