[MXS-3623] Race condition in persistent connections Created: 2021-06-17  Updated: 2021-06-21  Resolved: 2021-06-21

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.5.13
Fix Version/s: 2.5.14

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

If a connection is taken from the persistent connection pool and a COM_CHANGE_USER is sent through it immediately with a different set of credentials, the backend server can potentially reject the authentication if it sends an AuthSwitchRequest packet as a response.

This is caused by the use of the shared data structure across two different requests. As the COM_CHANGE_USER changes the active credentials to something else, the auth token sent as the response to the AuthSwitchRequest is the one in the COM_CHANGE_USER and not the one that was sent by the original COM_CHANGE_USER used to reset the persistent connection. Since the consistency can only be guaranteed for the duration of a single event, the current auth token must be stored for the duration of the COM_CHANGE_USER.


Generated at Thu Feb 08 04:22:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.