Security context

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

crossterm-rs/crossterm-winapi
master @ 49bc68d
2
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Data Race: 1 prior fix. Scrutinize any change in this area.
src/console.rs: most-fixed (1 issue). 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: Safe wrapper code previously called set_len on an uninitialized vector before invoking ReadConsoleInputW, which could expose uninitialized heap memory to safe Rust if the Windows API call partially failed or returned fewer elements than expected. Developers must ensure buffers are fully initialized or safely resized only after verified writes.
Data Race: Inappropriate or safe exposure of constructors wrapping raw Windows HANDLE types, combined with manual Send/Sync implementations, allowed potential data races across thread boundaries. Restricting raw handle construction to unsafe functions is required to prevent downstream callers from violating synchronization assumptions.