Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-9352 Avoid out of bounds access due to ulong bitmask #5388

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

VarunNagaraju
Copy link
Contributor

https://perconadev.atlassian.net/browse/PS-9352

Bug#35507223 mysql/mysql-server@3a27636ac1b

In MySQL 8.0 there are cases in which ~NO_ACCESS bitmask is passed as "access" argument to get_privilege_desc() function. In the past, before Bug#35507223 was fixed, this could have caused crash due to out of bounds array access.

Since we can't totally exclude that the same thing is possible in 5.7 branch we have decided to fix potential problem there as well, by adding simple check for out of bounds array access.

https://perconadev.atlassian.net/browse/PS-9352

Bug#35507223 mysql/mysql-server@3a27636ac1b

In MySQL 8.0 there are cases in which ~NO_ACCESS bitmask is passed as
"access" argument to get_privilege_desc() function. In the past, before
Bug#35507223 was fixed, this could have caused crash due to out of bounds
array access.

Since we can't totally exclude that the same thing is possible in 5.7 branch
we have decided to fix potential problem there as well, by adding simple check
for out of bounds array access.
Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VarunNagaraju
Copy link
Contributor Author

@VarunNagaraju VarunNagaraju merged commit 6545558 into percona:5.7 Aug 29, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants