Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65970

replSetFreeze does not handle large values for seconds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2022-05-02
    • 36

      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
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: