libbson doesn't validate length inside binary subtype 0x02

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.6.0
    • Affects Version/s: None
    • Component/s: libbson
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Deprecated subtype 0x02 includes a redundant length inside the binary payload. libbson doesn't validate this length and just skips over it.

      _bson_iter_next_internal does validate that subtype 0x02 has at least 4 bytes for the inner length. It should validate that the inner length is consistent with the binary envelope as well.

              Assignee:
              [DO NOT USE] Backlog - C Driver Team
              Reporter:
              David Golden
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: