Security context

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

servo/rust-smallvec
v2 @ bc8a854
5
Fixes
0
CVEs
HIGH
Peak severity
60.0%
Coverage
Highlights
Memory Safety: 3 prior fixes. Scrutinize any change in this area.
src/lib.rs: most-fixed (3 issues). Treat as high-risk during review.
5 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: The `SmallVec::insert_many` function was vulnerable to buffer overflows when an iterator yielded more items than its lower-bound size hint, demonstrating that trusting untrusted iterator size hints can lead to memory safety violations.
Use After Free: Calling `leak` on an inline (stack-allocated) `SmallVec` returned a reference to stack memory with an unrestricted lifetime, allowing the reference to outlive the stack frame and cause a use-after-free.
Memory Safety: Panics during iteration within `Extend` could leave the vector in an inconsistent state with an incorrect length, causing double-free or uninitialized memory read vulnerabilities upon destruction.