Security context

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

alibaba/mnn
master @ 4a1ac98
8
Fixes
0
CVEs
HIGH
Peak severity
14.3%
Coverage
Highlights
Integer Overflow: 2 prior fixes. Scrutinize any change in this area.
Backend: 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.

Heap-based Buffer Overflow: Tensor size allocations for specialized CPU execution paths, such as Query tensors in attention mechanisms, can fail to pad and align memory accurately, leading to out-of-bounds heap writes during quantization. Developers should guarantee uniform pack alignment boundaries on all tensor allocations.
Integer Overflow: Address offset calculations and type-byte determinations commonly overflow when returning or handling raw integer types, which subsequently triggers undersized memory allocations across major execution backends. Promoted types (size_t) must be enforced for all byte-size calculations.
Memory Corruption: Incorrect slicing boundary checks and sizing errors during Winograd convolution input parsing allow invalid tensor sizes to propagate into the device allocation phase, causing memory corruption. Slicing logic must validate output ranges strictly against parent tensor bounds.