sql: granting a global priv to a user for the first time can access priv cache without sufficient locking #142992
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
An unrelated PR surfaced an interesting race (stack below) which suggests that the global privilege descriptor cache is not locking objects sufficiently before modification. One goroutine attempted to update a priv descriptor in the cache here, while a different goroutine was authorizing a request using the same descriptor here.
More context in slack thread https://cockroachlabs.slack.com/archives/C04N0AS14CT/p1741980496915059
I'll let sql-foundations determine how many branches this bug affects.
Jira issue: CRDB-48617
The text was updated successfully, but these errors were encountered: