[SERVER-68901] Incorrect $elemMatch query analysis in mongocryptd if document contains 2 different fields with the same name Created: 17/Aug/22 Updated: 29/Oct/23 Resolved: 02/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.0 |
| Fix Version/s: | 6.1.1, 4.2.24, 4.4.19, 5.0.15, 6.0.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dmitry Lukyanov (Inactive) | Assignee: | Davis Haupt (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | csfle | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v6.1, v6.0, v5.0, v4.4, v4.2
|
||||||||||||
| Steps To Reproduce: | Repros:
|
||||||||||||
| Sprint: | QO 2022-09-05 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
mongocryptd $elemMatch analysis encrypts field that is not mentioned in schemaMap. This happens if a document contains 2 different fields with the same name. If one of this field is mentioned in schemaMap, $elemMatch query analysis will encrypt both of them during filter creating. |
| Comments |
| Comment by Githook User [ 16/Nov/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Githook User [ 16/Nov/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Githook User [ 15/Nov/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Githook User [ 15/Nov/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Githook User [ 15/Nov/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Githook User [ 02/Sep/22 ] |
|
Author: {'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}Message: |
| Comment by Davis Haupt (Inactive) [ 01/Sep/22 ] |
|
Also filed SERVER-69377 to properly handle $elemMatch when we support arrays in query analysis. |
| Comment by Davis Haupt (Inactive) [ 01/Sep/22 ] |
|
Requesting backports to 4.2 since this will affect all previous versions of mongocryptd. |
| Comment by Nicholas Zolnierz [ 17/Aug/22 ] |