Security context

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

facebookresearch/faiss
main @ a6f9775
9
Fixes
0
CVEs
HIGH
Peak severity
42.9%
Coverage
Highlights
Memory Corruption: 3 prior fixes. Scrutinize any change in this area.
faiss/impl/index_read.cpp: most-fixed (3 issues). Treat as high-risk during review.
4 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.

Integer Overflow: Deserializing malformed indexes with extremely large 'ntotal' values or code sizes causes multiplication overflows during size calculation. This leads to under-allocated buffers and subsequent out-of-bounds heap writes during memcpy.
Memory Corruption: Inconsistent or unvalidated structural parameters, such as mismatched dimensions in VectorTransform/IndexPreTransform chains or out-of-range SVSStorageKind enum values, trigger undefined memory layouts and severe memory corruption during index deserialization.
Integer Overflow: Large query parameters passed to IndexRefine search functions result in integer overflows when calculating buffer allocations for search results, leading to undersized heap buffers and heap buffer overflows.