[SERVER-79443] Fix legacy shell crash if an auto-encryption function is called on closed Mongo connection Created: 27/Jul/23  Updated: 29/Oct/23  Resolved: 31/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Erwin Pe Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-77600 Put a Queryable Encryption test in js... Closed
Backwards Compatibility: Fully Compatible
Sprint: Security 2023-08-07
Participants:

 Description   

SERVER-77600 added the ability to set and toggle auto-encryption on an existing Mongo connection. This added new functions to the Mongo object namely: set/unsetAutoEncryption(), toggleAutoEncryption(), isAutoEncryptionEnabled(), and getAutoEncryptionOptions().  If these functions are called after the connection was closed, it results in a segmentation fault, since these functions do not check the private data shared pointer before dereferencing it.  The proper behavior is to throw an exception.



 Comments   
Comment by Githook User [ 28/Jul/23 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-79443 Fix legacy shell crash if auto-encryption function is called on closed Mongo connection
Branch: master
https://github.com/mongodb/mongo/commit/3419d74bc9abf795ddf6903679cd63e5c5b9ed8b

Generated at Thu Feb 08 06:40:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.