Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

rust-lang/rust
main @ cddcbec
228
Fixes
24
CVEs
CRITICAL
Peak severity
17.1%
Coverage
Highlights
Denial of Service: 84 prior fixes. Scrutinize any change in this area.
library/alloc/src/collections/vec_deque/mod.rs: most-fixed (8 issues). Treat as high-risk during review.
89 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Safety: Specialized TrustedRandomAccess implementations in the Zip iterator bypassed safety invariants during panic unwinding or mixed backward/forward iteration, resulting in double-drops or out-of-bounds reads. This is tracked under multiple CVEs.
Path Traversal: Recursive filesystem removal routines in remove_dir_all were vulnerable to TOCTOU symlink-following race conditions, allowing unprivileged local actors to delete files outside the target directory.
Double Free: Incorrect logical-to-physical index translations and flawed capacity calculations in VecDeque methods (e.g., make_contiguous, shrink_to, and splice) resulted in out-of-bounds writes or double-free conditions during execution or panic unwinding.