Skip to content

Commit 135df8b

Browse files
committed
Skip testing the old server with a new client to prevent crashes
It happens when the client is parsing response for the PREPARE STATEMENT packet which contains PARAMETERS metadata. After all PARAMETERS metadata is the EOF packet. But the MySQL 4.1 server does not return in this EOF packet Warning Count and Server Status fields. MySQL 8.0+ client code in the function cli_read_metadata_ex() which is called from cli_read_prepare_result(), does not check for the packet length and hence try to dereference memory out of the buffer and assigns into the mysql->server_status variable some garbage data.
1 parent 8a4eb3c commit 135df8b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,13 @@ jobs:
257257
- server-version: mysql-4.1.22
258258
client-version: mariadbconc-3.0.6
259259
# MySQL client versions 8.0.4 - 8.4.0 and 8.1.0 have bug which
260-
# prevents connection to MySQL server versions prior 5.5.7
261-
- server-version: mysql-4.1.22
262-
client-version: mysql-8.0.3-rc
260+
# prevents connection to MySQL server versions prior 5.5.7.
261+
# Moreover, old server versions don't send Warning Count and Server
262+
# Status fields in the response to prepare, but the client doesn't
263+
# check the packet length and dereferences the memory out of the
264+
# buffer.
265+
#- server-version: mysql-4.1.22
266+
# client-version: mysql-8.0.3-rc
263267
- server-version: mysql-5.1.72
264268
client-version: mysql-8.0.3-rc
265269
- server-version: system-pic

0 commit comments

Comments
 (0)