SERVER-138939ClosedFixed

Potential null pointer dereference in getRetryableWriteTransactionParticipantCatalog()

I found a potential null pointer dereference in {{getRetryableWriteTransactionParticipantCatalog()}} in MongoDB 8.0.9: [https://github.com/mongodb/mongo/blob/r8.0.9/src/mongo/db/transaction/transaction_participant.cpp#L155-L162] In this method, the return value of {{OperationContextSession::get(opCtx)}} is passed to another overload of {{getRetryableWriteTransactionParticipantCatalog()}} without a prior null check: {{auto session = OperationContextSession::get(opCtx); return getRetryab

Affected Versions
Versions known to exhibit this issue
8.0.9
Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1026
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
StaticCodeAnalsis