Memory Safety Bugs in Rust Standard Library
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Microsoft's FORGE Lab reported memory-safety bugs in Rust's core and std libraries, some triggerable from entirely safe code, found partly with its AI scanner Hyenas. They fall into three patterns: assuming code won't panic (MapWindows::clone), trusting user-written trait implementations (str::replace with a custom Pattern), and trusting process-wide OS state (process::exit, CommandExt::exec). The team rated practical exploitation of the signal-stack bug unlikely, an assessment limited to that issue. For builders, unsafe code must stay sound when caller-supplied code misbehaves. Some dates and fix details were not independently verified.