Security context

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

paddlepaddle/paddle-lite
develop @ 8c07d68
4
Fixes
0
CVEs
HIGH
Peak severity
33.3%
Coverage
Highlights
Buffer Overflow: 2 prior fixes. Scrutinize any change in this area.
lite/backends/arm/math/pooling.cc: 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.

Buffer Overflow: Incorrect calculation of workspace size in the ARM Winograd convolution kernel leads to heap memory overflows during internal mathematical operations. Developers must ensure workspace sizing is dynamically recalculated based on internal operation demands.
Memory Safety: The model loader allocated memory using Swift's UnsafeMutablePointer with incorrect capacity bounds and mismatched deinitialization counts, leading to potential heap memory corruption when processing mobile models. All manual allocations must strictly pair capacity and count parameters during deinitialization.
Buffer Overflow: An out-of-bounds write / overflow crash occurred in the 3x3 average pooling ARM math kernel due to incorrect unroll loop boundary parameters, necessitating precise boundary checks when defining strides and padding in math kernels.