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

Roles with many duplicate linked roles assert, without nice error message

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.4
    • Component/s: Security
    • ALL

      > var duplicateRoles = [ "a", "a", "a", "a", ... "a" ];
      > db.runCommand(

      { createRole: "dup", privileges: [], roles: duplicateRoles }

      );

      > db.runCommand(

      { grantRolesToRole: "empty", privileges: [], roles: duplicateRoles }

      );

      In both cases, when the duplicateRoles array becomes very large (>16mb) we get an error and a stack trace from mongo:

      Assertion: 10334:BSONObj size: 19888945 (0x12F7B31) is invalid.

      Instead, I would expect one of two things: a graceful failure with a nice error message, or a successful insert, since the linked roles will (in theory) be de-duped before the parent role is stored in the db.

        1. dup_role_test.js
          2 kB
          Samantha Ritter

            Assignee:
            Unassigned Unassigned
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: