Skip to content

Add missing check in mysqlnd_auth.c - #21711

Open
kamil-tekiela wants to merge 1 commit into
php:PHP-8.4from
kamil-tekiela:Add-missing-check
Open

Add missing check in mysqlnd_auth.c#21711
kamil-tekiela wants to merge 1 commit into
php:PHP-8.4from
kamil-tekiela:Add-missing-check

Conversation

@kamil-tekiela

Copy link
Copy Markdown
Member

Identified by Claude. Not sure if it causes any issues currently, but judging by how other plugins operate, there should be a check here too. Claude believes there's a remote chance this could even be exploited, although I doubt it's a security issue.

@Sjord

Sjord commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Looks good to me.

It seems that it already read SCRAMBLE_LENGTH bytes from the auth_plugin_data:

mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, SCRAMBLE_LENGTH);

So the risk is that the client sends uninitialized memory to the server if the scramble is too short.

@nikic Could you take a look at this?

@kamil-tekiela

Copy link
Copy Markdown
Member Author

@bukka Should this PR be closed too? Are you still working on it?

@bukka

bukka commented Aug 31, 2026

Copy link
Copy Markdown
Member

I will check it so keep it open please. Not part of that other thing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants