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

LDAP CNAME resolution truncates CNAME incorrectly

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc11, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • Security 2022-06-27

      dn_expand returns the length of the compressed string, not the length of the uncompressed string. It fills the buffer with a null-terminated string and so we should construct a string using the non-length constructor for std::string.

      See https://github.com/mongodb/mongo/blob/f495bdead326a06a76f8a980e44092deb096a21d/src/mongo/util/dns_query_posix-impl.h#L191
      References:
      https://www.man7.org/linux/man-pages/man3/dn_expand.3.html

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: