Unit-tests can data race on AuthorizationManager setters and getters

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • ALL
    • Security 2024-08-05, Security 2024-08-19, Security 2024-09-02, Security 2024-10-28, Security 2024-11-11, Security 2024-11-25
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            George Wangensteen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: