[SERVER-43699] Find $mod can result in UB Created: 27/Sep/19  Updated: 29/Oct/23  Resolved: 06/Oct/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.6.14, 4.0.12, 4.2.0
Fix Version/s: 3.6.15, 4.2.1, 4.3.1, 3.4.24, 4.0.14

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Bernard Gorman
Resolution: Fixed Votes: 0
Labels: afz
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.2, v4.0, v3.6, v3.4
Sprint: Query 2019-10-21
Participants:
Linked BF Score: 15

 Description   
CVE-2019-2392

Title: $mod can result in UB

Description:
A user authorized to perform database queries may trigger denial of service by issuing specially crafted queries, which use the $mod operator to overflow negative values. This issue affects: MongoDB Inc. MongoDB Server v4.4 versions prior to 4.4.1; v4.2 versions prior to 4.2.9; v4.0 versions prior to 4.0.20; v3.6 versions prior to 3.6.20.

CVSS score:
This issue's CVSS:3.1 severity is scored at 6.5 using the following scoring metrics:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected versions:
MongoDB Inc. MongoDB Server v4.4 versions prior to 4.4.1; v4.2 versions prior to 4.2.9; v4.0 versions prior to 4.0.20; v3.6 versions prior to 3.6.20.

CWE: CWE-190: Integer Overflow or Wraparound



 Comments   
Comment by Bernard Gorman [ 09/Oct/19 ]

Author:

{'username': 'gormanb', 'email': 'bernard.gorman@mongodb.com', 'name': 'Bernard Gorman'}

Message: SERVER-43699 $mod should not overflow for large negative values

(cherry picked from commit 21d8699ed6c517b45e1613e20231cd8eba894985)
Branch: v3.4
https://github.com/mongodb/mongo/commit/b5ff43f92c0e562121477e8253a56b2d83825571

Comment by Githook User [ 08/Oct/19 ]

Author:

{'username': 'gormanb', 'email': 'bernard.gorman@mongodb.com', 'name': 'Bernard Gorman'}

Message: SERVER-43699 $mod should not overflow for large negative values

(cherry picked from commit 21d8699ed6c517b45e1613e20231cd8eba894985)
Branch: v3.6
https://github.com/mongodb/mongo/commit/5710a3332449c1cbe2b4c46043f4283bd19a8a43

Comment by Githook User [ 07/Oct/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@mongodb.com'}

Message: SERVER-43699 $mod should not overflow for large negative values

(cherry picked from commit 21d8699ed6c517b45e1613e20231cd8eba894985)
Branch: v4.0
https://github.com/mongodb/mongo/commit/7a81d51b0905dee4c24a17069d84d431041e980b

Comment by Githook User [ 07/Oct/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@mongodb.com'}

Message: SERVER-43699 $mod should not overflow for large negative values

(cherry picked from commit 21d8699ed6c517b45e1613e20231cd8eba894985)
Branch: v4.2
https://github.com/mongodb/mongo/commit/e865364752da4262e605b92bf8c13e134e7539d3

Comment by Githook User [ 06/Oct/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@mongodb.com'}

Message: SERVER-43699 $mod should not overflow for large negative values
Branch: master
https://github.com/mongodb/mongo/commit/21d8699ed6c517b45e1613e20231cd8eba894985

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