Skip to content

MOD-7570: Valid safe vector index pointer access#5422

Merged
lerman25 merged 7 commits intomasterfrom
OmerL_valid_vector_index_test
Jan 7, 2025
Merged

MOD-7570: Valid safe vector index pointer access#5422
lerman25 merged 7 commits intomasterfrom
OmerL_valid_vector_index_test

Conversation

@lerman25
Copy link
Collaborator

@lerman25 lerman25 commented Jan 1, 2025

Validation on vector index pointer accesses to prevent null pointer access.
Solving 2 bugs:

  1. Creating index with schema containing vector index field with invalid parameters, resulting in crash when Inserting and then updating a doc that's in the index but without a vector field.
  2. Debug command vecsim_info crashes when the vector index was created with invalid parameters.

@CLAassistant
Copy link

CLAassistant commented Jan 1, 2025

CLA assistant check
All committers have signed the CLA.

@lerman25 lerman25 changed the title Valid vector index check & test [MOD-7570] Valid safe vector index pointer access Jan 1, 2025
@codecov
Copy link

codecov bot commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.56%. Comparing base (0ba0c32) to head (4640f7d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5422      +/-   ##
==========================================
- Coverage   87.57%   87.56%   -0.01%     
==========================================
  Files         196      196              
  Lines       34846    34856      +10     
==========================================
+ Hits        30515    30521       +6     
- Misses       4331     4335       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lerman25 lerman25 requested a review from alonre24 January 2, 2025 08:39
Copy link
Collaborator

@GuyAv46 GuyAv46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice
A few styling comments

Copy link
Collaborator

@alonre24 alonre24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Few comments

@lerman25 lerman25 changed the title [MOD-7570] Valid safe vector index pointer access MOD-7570: Valid safe vector index pointer access Jan 2, 2025
@lerman25 lerman25 requested review from GuyAv46 and alonre24 January 6, 2025 08:18
@lerman25 lerman25 requested a review from GuyAv46 January 6, 2025 13:51
GuyAv46
GuyAv46 previously approved these changes Jan 6, 2025
Copy link
Collaborator

@alonre24 alonre24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! only two small comments

@lerman25 lerman25 requested review from GuyAv46 and alonre24 January 7, 2025 09:40
@lerman25 lerman25 added this pull request to the merge queue Jan 7, 2025
Merged via the queue into master with commit aeb1d54 Jan 7, 2025
9 checks passed
@lerman25 lerman25 deleted the OmerL_valid_vector_index_test branch January 7, 2025 15:59
@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.8, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.8
git worktree add -d .worktree/backport-5422-to-2.8 origin/2.8
cd .worktree/backport-5422-to-2.8
git switch --create backport-5422-to-2.8
git cherry-pick -x aeb1d54fb324051eb8c5b97204273f658da20de7

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.6, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.6
git worktree add -d .worktree/backport-5422-to-2.6 origin/2.6
cd .worktree/backport-5422-to-2.6
git switch --create backport-5422-to-2.6
git cherry-pick -x aeb1d54fb324051eb8c5b97204273f658da20de7

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.10, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.10
git worktree add -d .worktree/backport-5422-to-2.10 origin/2.10
cd .worktree/backport-5422-to-2.10
git switch --create backport-5422-to-2.10
git cherry-pick -x aeb1d54fb324051eb8c5b97204273f658da20de7

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Jan 7, 2025
* null ptr check + pytest

* pytest + small fix

* fix api calls, add debug test, remove field&index ft.info errors

* format fixes, add pytest to debug dumpHNSW

* fix kdv free

* Comment change and PING after flushall

(cherry picked from commit aeb1d54)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.0:

github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2025
MOD-7570: Valid safe vector index pointer access (#5422)

* null ptr check + pytest

* pytest + small fix

* fix api calls, add debug test, remove field&index ft.info errors

* format fixes, add pytest to debug dumpHNSW

* fix kdv free

* Comment change and PING after flushall

(cherry picked from commit aeb1d54)

Co-authored-by: lerman25 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants