Security context

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

razrfalcon/memmap2-rs
master @ e9444d0
3
Fixes
0
CVEs
HIGH
Peak severity
33.3%
Coverage
Highlights
Memory Safety: 2 prior fixes. Scrutinize any change in this area.
src/lib.rs: most-fixed (3 issues). Treat as high-risk during review.
2 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: Constructing slices from raw memory maps without validating that the length is within `isize::MAX` bounds can lead to undefined behavior, particularly on 32-bit targets.
Memory Safety: Exposing memory advising operations like `unchecked_advise_range` as safe Rust functions allows arbitrary, unvalidated memory offset operations that can trigger undefined behavior if callers pass invalid ranges.
Integer Overflow: Calculating file lengths on 32-bit systems can result in integer truncation or overflows during mapping option parsing, causing incorrect memory boundaries to be mapped.