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

Unit-tests can data race on AuthorizationManager setters and getters

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • ALL
    • Security 2024-08-05, Security 2024-08-19, Security 2024-09-02, Security 2024-10-14

      Unit-tests that set an AuthorizationManager in their set-up phase, like typed command test here: https://github.com/10gen/mongo/blob/cbb2dd5bbf0407792b3a808bd8adc131e6fb9b51/src/mongo/db/commands_test.cpp#L268

      can have this set operation race with get operations that are done in background jobs that make clients, due to the authzClientObserver here: https://github.com/10gen/mongo/blame/cbb2dd5bbf0407792b3a808bd8adc131e6fb9b51/src/mongo/db/auth/auth_decorations.cpp#L71. If the background job starts before the AuthzManager is set, this is a data race.

            Assignee:
            shreyas.kalyan@mongodb.com Shreyas Kalyan
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: