[SERVER-59189] mongos dbStats does not handle large values for scale Created: 09/Aug/21  Updated: 29/Oct/23  Resolved: 13/Aug/21

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

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-65970 replSetFreeze does not handle large v... Closed
related to SERVER-67802 mongos count does not handle large va... Closed
is related to SERVER-56689 mongos collStats does not handle larg... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-08-23
Participants:
Linked BF Score: 52

 Description   

This was reported by our UBSAN builder when a fuzzer test passed a large value for the scale option to the dbStats command on a shard:

See SERVER-56689 for a similar fix in the mongos collStats command.

[j0:s] src/mongo/bson/bsonelement.h:974:25: runtime error: 9.22337e+18 is outside the range of representable values of type 'int'
 
[j0:s]     #0 0x55b214ad80c9 in mongo::BSONElement::numberInt() const /data/mci/d72e3e8444b63d0a440661d740da8ad6/src/src/mongo/bson/bsonelement.h:974:25
[j0:s]     #1 0x55b214af547c in mongo::(anonymous namespace)::DBStatsCmd::errmsgRun(mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, mongo::BSONObjBuilder&) /data/mci/d72e3e8444b63d0a440661d740da8ad6/src/src/mongo/s/commands/cluster_db_stats_cmd.cpp:117:37



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 13/Aug/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59189 ensure mongos dbStats can handle large values for scale
Branch: master
https://github.com/mongodb/mongo/commit/f7371d2668dfe3b8fba9280d50d7a0bebb9ac226

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