Security context

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

bytecodealliance/rustix
main @ 035acdc
2
Fixes
1
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Memory Safety: 2 prior fixes. Scrutinize any change in this area.
src/backend/libc/net/msghdr.rs: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix 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: Raw pointers passed to OS-level structures like c::msghdr can point to temporary sockaddr structures that are dropped prematurely, leading to use-after-free vulnerabilities. Developers must enforce strict lifetime boundaries via references rather than temporary values.
Memory Safety: Exposing system operations like unshare with CLONE_FILES as safe functions allows safe Rust to invalidate file descriptor tables across multiple threads, leading to memory unsafety and dangling descriptors in other threads. Such interfaces must be marked unsafe.
Resource Management Errors: Unhandled IO errors and overallocation inside directory iteration under the linux_raw backend can lead to unbounded memory growth and memory exhaustion.