Security context

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

rust-ndarray/ndarray
master @ bd3ade9
3
Fixes
0
CVEs
HIGH
Peak severity
100.0%
Coverage
Highlights
Memory Corruption: 2 prior fixes. Scrutinize any change in this area.
src/impl_owned_array.rs: most-fixed (1 issue). Treat as high-risk during review.
3 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 Corruption: Integer overflow in capacity reservation calculations can result in undersized memory allocations, enabling subsequent heap-based out-of-bounds writes. This is a critical risk for operations that dynamically resize or initialize multi-dimensional arrays.
Memory Corruption: Macros exposing internal parsing branches with unsafe constructs allow callers to bypass standard type-level dimensions checks, leading to memory corruption through inconsistent dimension structures.
Denial of Service: Infinite recursion can be triggered when processing layout configurations that are simultaneously F-order and C-order (such as 1x1 arrays) combined with extreme offset values (k), resulting in stack exhaustion.