Rust’s standard library was vulnerable for years and nobody noticed

Rust’s standard library was vulnerable for years and nobody noticed

To do that, they explicitly opt in to potentially unsafe operations (read: barely reproducible crashes, security vulnerabilities) by annotating a block with unsafe, like this: unsafe { Dragons::hatch(); }
However, Rust is different from languages like Python or Go in that it lets you use unsafe outside the standard library. It’s those kinds of bugs that present remote code execution vulnerabilities, and that safe Rust is designed to prevent. I was contemplating my course of action when I’ve accidentally stumbled upon a reddit thread discussing the history of vulnerabilities in the Rust standard library, which pointed out this gem:
seg fault pushing on either side of a is a buffer overflow bug in the standard library’s implementation of a double-ended queue.

Source: medium.com