• Arun Kuruvila's avatar
    Bug #21602056 : CONCURRENT FLUSH PRIVILEGES + REVOKE/GRANT · 3846b085
    Arun Kuruvila authored
                    CRASHES IN WILD_CASE_COMPARE!
    
    Description:- Executing FLUSH PRIVILEGES and REVOKE/
    GRANT concurrently crashes the server.
    
    Analysis:- Concurrent FLUSH PRIVILEGES and REVOKE/GRANT
    might trigger a small time frame in which REVOKE/GRANT
    fetches the "acl_proxy_user" information as a part of
    "acl_check_proxy_grant_access()". Meanwhile FLUSH PRIVILEGES
    deletes the old acl structures as a part of "acl_reload()".
    After which REVOKE/GRANT tries to access the hostname in
    "wild_case_compare()" which leads to a crash because of the
    invalid memory access.
    
    Fix:- Mutex lock on "acl_cache" is acquired before fetching
    "acl_proxy_user" information in
    "acl_check_proxy_grant_access()".
    3846b085
sql_acl.cc 300 KB