You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MDEV-22755 CREATE USER leads to indirect SIGABRT in __stack_chk_fail () from fill_schema_user_privileges + *** stack smashing detected *** (on optimized builds)
The code erroneously used buff[100] in a fiew places to make a GRANTEE value in the form: 'user'@'host' Fix: - Fixing the code to use (USER_HOST_BUFF_SIZE + 6) instead of 100. - Adding a DBUG_ASSERT to make sure the buffer is enough - Wrapping the code into a class Grantee_str, to reuse it easier in 4 places.
Copy file name to clipboardExpand all lines: mysql-test/r/grant.result
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2633,3 +2633,16 @@ ERROR 42000: Access denied for user 'untrusted'@'localhost' to database 'secret'
2633
2633
DROP USER untrusted@localhost;
2634
2634
DROP DATABASE secret;
2635
2635
set GLOBAL sql_mode=default;
2636
+
#
2637
+
# MDEV-22755 CREATE USER leads to indirect SIGABRT in __stack_chk_fail () from fill_schema_user_privileges + *** stack smashing detected *** (on optimized builds)
2638
+
#
2639
+
SET NAMES utf8;
2640
+
SET SQL_MODE='';
2641
+
CREATE USER 觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻@localhost;
2642
+
SELECT * FROM INFORMATION_SCHEMA.user_privileges WHERE GRANTEE LIKE "'abcdefghijklmnopqrstuvwxyz'%";
2643
+
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
2644
+
SELECT GRANTEE FROM INFORMATION_SCHEMA.user_privileges WHERE GRANTEE LIKE '%觻%';
Copy file name to clipboardExpand all lines: mysql-test/t/grant.test
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2292,3 +2292,16 @@ DROP DATABASE secret;
2292
2292
set GLOBAL sql_mode=default;
2293
2293
# Wait till we reached the initial number of concurrent sessions
2294
2294
--source include/wait_until_count_sessions.inc
2295
+
2296
+
2297
+
--echo #
2298
+
--echo # MDEV-22755 CREATE USER leads to indirect SIGABRT in __stack_chk_fail () from fill_schema_user_privileges + *** stack smashing detected *** (on optimized builds)
2299
+
--echo #
2300
+
2301
+
SET NAMES utf8;
2302
+
SET SQL_MODE='';
2303
+
CREATE USER 觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻@localhost;
2304
+
SELECT * FROM INFORMATION_SCHEMA.user_privileges WHERE GRANTEE LIKE "'abcdefghijklmnopqrstuvwxyz'%";
2305
+
SELECT GRANTEE FROM INFORMATION_SCHEMA.user_privileges WHERE GRANTEE LIKE '%觻%';
2306
+
DROP USER 觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻_觻觻觻觻觻觻觻觻觻觻@localhost;
0 commit comments