Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4d1c1b23
Commit
4d1c1b23
authored
Jan 17, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#29630767 - USE OF UNINITIALIZED VALUE IN LIBMYSQL (CLIENT.CC FUNCTION RUN_PLUGIN_AUTH)
parent
49b9ce15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
mysql-test/r/connect_debug.result
mysql-test/r/connect_debug.result
+8
-0
mysql-test/t/connect_debug.test
mysql-test/t/connect_debug.test
+15
-0
sql-common/client.c
sql-common/client.c
+4
-1
sql/sql_acl.cc
sql/sql_acl.cc
+1
-0
No files found.
mysql-test/r/connect_debug.result
View file @
4d1c1b23
...
...
@@ -8,3 +8,11 @@ create user 'bad' identified by 'worse';
ERROR 2059 (HY000): Authentication plugin 'foo/bar' cannot be loaded: invalid plugin name
set global debug_dbug=@old_dbug;
drop user bad;
set global debug_dbug='+d,increase_srv_handshake_scramble_len';
connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock);
ERROR HY000: Malformed packet
set global debug_dbug=@old_dbug;
set global debug_dbug='+d,poison_srv_handshake_scramble_len';
connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock);
ERROR HY000: Malformed packet
set global debug_dbug=@old_dbug;
mysql-test/t/connect_debug.test
View file @
4d1c1b23
...
...
@@ -21,3 +21,18 @@ create user 'bad' identified by 'worse';
--
exec
$MYSQL
--
default
-
auth
=
mysql_old_password
--
user
=
bad
--
password
=
worse
2
>&
1
set
global
debug_dbug
=@
old_dbug
;
drop
user
bad
;
#
# Bug#29630767 - USE OF UNINITIALIZED VALUE IN LIBMYSQL (CLIENT.CC FUNCTION RUN_PLUGIN_AUTH)
#
set
global
debug_dbug
=
'+d,increase_srv_handshake_scramble_len'
;
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
error
2027
connect
con1
,
localhost
,
root
;
set
global
debug_dbug
=@
old_dbug
;
set
global
debug_dbug
=
'+d,poison_srv_handshake_scramble_len'
;
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
$MASTER_MYPORT
MASTER_MYPORT
--
error
2027
connect
con2
,
localhost
,
root
;
set
global
debug_dbug
=@
old_dbug
;
sql-common/client.c
View file @
4d1c1b23
...
...
@@ -3538,7 +3538,10 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
scramble_data_len
=
pkt_scramble_len
;
scramble_plugin
=
scramble_data
+
scramble_data_len
;
if
(
scramble_data
+
scramble_data_len
>
pkt_end
)
scramble_data_len
=
pkt_end
-
scramble_data
;
{
set_mysql_error
(
mysql
,
CR_MALFORMED_PACKET
,
unknown_sqlstate
);
goto
error
;
}
}
else
{
...
...
sql/sql_acl.cc
View file @
4d1c1b23
...
...
@@ -8178,6 +8178,7 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio,
int2store
(
end
+
5
,
thd
->
client_capabilities
>>
16
);
end
[
7
]
=
data_len
;
DBUG_EXECUTE_IF
(
"poison_srv_handshake_scramble_len"
,
end
[
7
]
=
-
100
;);
DBUG_EXECUTE_IF
(
"increase_srv_handshake_scramble_len"
,
end
[
7
]
=
50
;);
bzero
(
end
+
8
,
10
);
end
+=
18
;
/* write scramble tail */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment