• Robert Bindar's avatar
    MDEV-15907 ASAN heap-use-after-free · e52a4ab6
    Robert Bindar authored
    This patch fixes an invalid read in fill_effective_table_privileges
    triggered by a grant_version increase between a PREPARE for a
    statement creating a view from I_S and EXECUTE.
    A tmp table was created and free'd while preparing the statement,
    TABLE_LIST::table_name was set to point to the tmp table
    TABLE_SHARE::table_name which no longer existed after preparing was
    done.
    The grant version increase made fill_effective_table_privileges
    called during EXECUTE to try fetch the updated grant info and
    this is where the dangling table name was used.
    e52a4ab6
mdev15907.result 125 Bytes