1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-29852 SIGSEGV in mysql_create_routine or is_acl_user on 2nd execution, ASAN use-after-poison in get_current_user (sql_acl.cc)

if lex->definer is replaced, take care to restore it at the
end of PS EXECUTE
This commit is contained in:
Sergei Golubchik
2022-11-18 18:22:19 +01:00
parent 4493642e4c
commit 5e3c948cc9
3 changed files with 38 additions and 8 deletions

View File

@ -2800,9 +2800,10 @@ bool sp_process_definer(THD *thd)
}
else
{
LEX_USER *d= lex->definer= get_current_user(thd, lex->definer);
LEX_USER *d= get_current_user(thd, lex->definer);
if (!d)
DBUG_RETURN(TRUE);
thd->change_item_tree((Item**)&lex->definer, (Item*)d);
/*
If the specified definer differs from the current user or role, we