FAISS IndexRaBitQFastScan empty codes crash PoC
This repository contains the proof of concept and evidence files for a FAISS
IndexRaBitQFastScan deserialization crash.
Summary
A malformed serialized Irfn index can set the IndexRaBitQFastScan codes
vector length to 0. faiss.read_index() accepts the object, then search()
segfaults in native FAISS code.
Tested package:
faiss-cpu==1.14.3
numpy==2.5.0
Reproduce
python3 -m venv /tmp/faiss-rabitqfs-poc
/tmp/faiss-rabitqfs-poc/bin/python -m pip install --upgrade pip
/tmp/faiss-rabitqfs-poc/bin/python -m pip install -r requirements.txt
/tmp/faiss-rabitqfs-poc/bin/python poc_faiss_rabitqfastscan_empty_codes_crash.py --crash
Expected result:
read_index accepted an Irfn index whose serialized codes vector length is 0
Fatal Python error: Segmentation fault
child returncode=-11
Files
poc_faiss_rabitqfastscan_empty_codes_crash.py- repeatable PoC.clean_rabitqfs.index- valid seed index generated by FAISS.malicious_rabitqfs_empty_codes.index- same index withIrfncodes.lenset to0.record-demo-output.txt- recorded PoC output.gdb-backtrace.txt- native backtrace.source-index-read-rabitqfastscan-v1.14.3.txt- vulnerable release source snippet.source-index-read-rabitqfastscan-main.txt- current main source snippet.duplicate-check.txt- duplicate search notes and adjacent PR context.environment.txt- tested environment.SHA256SUMS- file hashes.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support