Skip to content

fix: fix potential use after free when removing Connections from ConnManager#7787

Merged
JoanFM merged 1 commit intomasterfrom
joan-fix-mrconn-disconnect
Dec 15, 2025
Merged

fix: fix potential use after free when removing Connections from ConnManager#7787
JoanFM merged 1 commit intomasterfrom
joan-fix-mrconn-disconnect

Conversation

@JoanFM
Copy link
Collaborator

@JoanFM JoanFM commented Dec 15, 2025

Describe the changes in the pull request

In the MRConnPool_Free we should set the connection pointed from the callbackCtx to NULL to avoid accessing freed data.


Note

Clear conn->conn->data in MRConnPool_Free before freeing connections to prevent callbacks from accessing freed memory.

Written by Cursor Bugbot for commit 6630461. This will update automatically on new commits. Configure here.

@JoanFM JoanFM marked this pull request as ready for review December 15, 2025 12:17
@JoanFM JoanFM requested review from GuyAv46 and alonre24 December 15, 2025 12:18
@JoanFM JoanFM marked this pull request as draft December 15, 2025 12:27
@JoanFM JoanFM force-pushed the joan-fix-mrconn-disconnect branch from 823bc02 to 2fad90b Compare December 15, 2025 12:36
@JoanFM JoanFM marked this pull request as ready for review December 15, 2025 12:36
@JoanFM JoanFM force-pushed the joan-fix-mrconn-disconnect branch from 2fad90b to 6630461 Compare December 15, 2025 12:37
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.78%. Comparing base (ee1b631) to head (6630461).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7787      +/-   ##
==========================================
- Coverage   84.78%   84.78%   -0.01%     
==========================================
  Files         351      351              
  Lines       54798    54800       +2     
  Branches    14764    14764              
==========================================
- Hits        46462    46461       -1     
- Misses       8137     8140       +3     
  Partials      199      199              
Flag Coverage Δ
flow 85.24% <100.00%> (-0.13%) ⬇️
unit 52.11% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoanFM JoanFM added this pull request to the merge queue Dec 15, 2025
@JoanFM JoanFM self-assigned this Dec 15, 2025
Merged via the queue into master with commit d80e74c Dec 15, 2025
26 checks passed
@JoanFM JoanFM deleted the joan-fix-mrconn-disconnect branch December 15, 2025 16:29
redisearch-backport-pull-request bot pushed a commit that referenced this pull request Dec 15, 2025
…Manager (#7787)

fix: fix potential use after free
(cherry picked from commit d80e74c)
@redisearch-backport-pull-request
Copy link
Contributor

github-merge-queue bot pushed a commit that referenced this pull request Dec 15, 2025
…m ConnManager (#7796)

fix: fix potential use after free when removing Connections from ConnManager (#7787)

fix: fix potential use after free
(cherry picked from commit d80e74c)

Co-authored-by: Joan Fontanals <[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.

2 participants