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

BSONObj::getStringField() does not handle embedded null bytes correctly

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Minor Change
    • ALL
    • Execution Team 2021-11-29, Execution Team 2021-12-13, Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24
    • 129

      A BSONElement of type String has a pointer + length implementation and therefore may contain an embedded null byte. BSONObj::getStringField uses valuestr in its implementation, which can lead us to incorrectly interpret the string as null terminated.

            Assignee:
            matt.kneiser@mongodb.com Matt Kneiser
            Reporter:
            marko.vojvodic@mongodb.com Marko Vojvodic
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: