[SERVER-65970] replSetFreeze does not handle large values for seconds Created: 26/Apr/22  Updated: 29/Oct/23  Resolved: 26/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.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
is related to SERVER-59189 mongos dbStats does not handle large ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-05-02
Participants:
Linked BF Score: 36

 Description   

This was reported by our UBSAN builder when a fuzzer test passed a large value for the seconds option to the replSetFreeze command on a shard:
See SERVER-59189 for a similar fix in the mongos dbStats command.

[j0:prim] src/mongo/bson/bsonelement.h:1081:25: runtime error: 2.14748e+09 is outside the range of representable values of type 'int'
 
[j0:prim]     #0 0x56180add7c99 in mongo::BSONElement::numberInt() const /data/mci/6d57a98917a5eec2c981b6639f4713c7/src/src/mongo/bson/bsonelement.h:1081:25
[j0:prim]     #1 0x56180afb46e8 in mongo::repl::CmdReplSetFreeze::run(mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj const&, mongo::BSONObjBuilder&) /data/mci/6d57a98917a5eec2c981b6639f4713c7/src/src/mongo/db/repl/repl_set_commands.cpp:509:47
[j0:prim]     #2 0x56180afad329 in mongo::BasicCommand::runWithReplyBuilder(mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj const&, mongo::rpc::ReplyBuilderInterface*) /data/mci/6d57a98917a5eec2c981b6639f4713c7/src/src/mongo/db/commands.h:966:16
[j0:prim]     #3 0x56180e4cee8f in mongo::BasicCommandWithReplyBuilderInterface::Invocation::run(mongo::OperationContext*, mongo::rpc::ReplyBuilderInterface*) /data/mci/7cad61147561d58549c19af4031dacc5/src/src/mongo/db/commands.cpp:905:29



 Comments   
Comment by Githook User [ 26/Apr/22 ]

Author:

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

Message: SERVER-65970 replSetFreeze does not handle large values for seconds
Branch: master
https://github.com/mongodb/mongo/commit/fa772faaadd01fa375514a54fc7c043c8ad7224a

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