-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible out-of-bound access for nb_neighbor function #4177
Comments
Let me investigate. |
bshethmeta
added a commit
to bshethmeta/faiss
that referenced
this issue
Feb 13, 2025
Summary: Based on this users comment it seems like we should do bound checking: facebookresearch#4177 Differential Revision: D69497295
facebook-github-bot
pushed a commit
that referenced
this issue
Feb 14, 2025
You are right. I've added a bounds check. #4185 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I noticed the nb_neighbor function is not bound checked, and this function is directly accessible in the Python API where out-of-bound access will return raw memory contents without any warning or error message.
I think this is quite dangerous especially in APIs for memory managed languages where people usually assume bound checks.
The text was updated successfully, but these errors were encountered: