[SERVER-56293] opCtx use after free in checkIfCanReadOrBlock Created: 23/Apr/21  Updated: 29/Oct/23  Resolved: 23/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0-rc1, 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: pm-1791_non-cloud-blocking, post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.9
Sprint: Repl 2021-05-03
Participants:
Linked BF Score: 50

 Description   

We can not capture the opCtx raw pointer in checkIfCanReadOrBlock because by the time we get a timeout error, the opCtx may not be valid anymore.



 Comments   
Comment by Githook User [ 23/Apr/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-56293: Fix out of scope opCtx capture in checkIfCanReadOrBlock

(cherry picked from commit e46ccf98296b03819006153c87c85d3b87bd8987)
Branch: v4.9
https://github.com/mongodb/mongo/commit/c13c5887dd1b01314145bc731efedb1db8a5642a

Comment by Githook User [ 23/Apr/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-56293: Fix out of scope opCtx capture in checkIfCanReadOrBlock
Branch: master
https://github.com/mongodb/mongo/commit/e46ccf98296b03819006153c87c85d3b87bd8987

Generated at Thu Feb 08 05:38:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.