-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Fix GH-16590: UAF in session_encode() #16640
Conversation
The `PS_ENCODE_LOOP` does not protect the session hash table that it iterates over. Change it by temporarily creating a copy.
I'm always a fan of plugging UAF issues, so I have no problem with this unless @SakiTakamachi or @NattyNarwhal see something here that I don't. |
I don't think there is a practical ABI break (okay, the |
I think this is good to merge to earlier releases too. I don't think it's an ABI break for the reasons Christoph outlined. |
Maybe not per se ABI break, but it is an API break at least. A third party extension that uses |
I tried to look for users of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSTM, will let RM decide where it can land.
Seems like there's not really a problem for the RMs to go lower than 8.4, but I will only push it to 8.4 because of the theoretical break and the fact that users are unlikely to encounter this anyway. If really necessary, it can always be backported. |
The
PS_ENCODE_LOOP
does not protect the session hash table that it iterates over. Change it by temporarily creating a copy.Only applied on 8.4 because of the ABI break. That should be fine as no one should be writing malicious code like this in the first place.
Asking RMs for permission: @SakiTakamachi @NattyNarwhal @ericmann