mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
Attempt to create a procedure with the DEFINER clause resulted in abnormal server termination in case the server run with the option --skip-grant-tables=1. The reason of abnormal termination is that on handling of the DEFINER clause, not initialized data members of acl_cache is accessed, that led to server crash. Behaviour of the server for considered use case must be the same as for embedded server. Than means, if a security subsytem wasn't initialized (server is started with the option --skip-grant-tables=1) return success from get_current_user() without further access to the acl_cache that obviously not initialized. Additionlly, AUTHID::is_role was modified to handle the case when a host part of the user name isn't provided. Treat this case as if the empty host name is provided.
This commit is contained in:
committed by
Oleksandr Byelkin
parent
64ea539f76
commit
56bc6901d6
@@ -414,6 +414,26 @@ CALL p2 (@a,@c);
|
||||
DROP PROCEDURE p2;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34501: SIGSEGV in pfs_start_mutex_wait_v1, __strlen_avx2, or __strlen_evex from safe_mutex_lock on CREATE DEFINER when using skip-grant-tables
|
||||
--echo #
|
||||
--echo # This test is a duplicate of the one located in the file skip_grants.test
|
||||
--echo # and placed here to check the same test case against embedded-server
|
||||
|
||||
# Disable warnings before running the following CREATE PROCEDURE/FUNCTION
|
||||
# statement since the warning message
|
||||
# "The user specified as a definer ('a'@'%') does not exist"
|
||||
# is output in case the test be run against a regular server
|
||||
# and isn't output if embedded server is used (@sa sp_process_definer()
|
||||
# in sql_parse.cc).
|
||||
--disable_warnings
|
||||
CREATE DEFINER=a PROCEDURE p() SELECT 1;
|
||||
CREATE DEFINER=a FUNCTION f() RETURNS INT RETURN 100;
|
||||
--enable_warnings
|
||||
|
||||
DROP PROCEDURE p;
|
||||
DROP FUNCTION f;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user