fix: add parameterized queries in sqlite-vec-ivf.c#298
Open
orbisai0security wants to merge 1 commit into
Open
Conversation
Automated security fix generated by OrbisAI Security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix high severity security issue in
sqlite-vec-ivf.c.Vulnerability
V-005sqlite-vec-ivf.c:465Description: In sqlite-vec-ivf.c, zSql buffers are freed via sqlite3_free at multiple call sites across the file. Error handling paths or early returns may cause sqlite3_free to be called multiple times on the same pointer (double-free), or the pointer may be accessed after freeing (use-after-free). Lines 359 and 362 show two consecutive sqlite3_free calls that may operate on the same zSql pointer under certain error conditions. An attacker who can trigger specific error conditions during query preparation may exploit these heap corruption conditions.
Changes
sqlite-vec-ivf.cVerification
Automated security fix by OrbisAI Security