-
-
Notifications
You must be signed in to change notification settings - Fork 54
Fix guest bridge stream reassembly #211
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
Conversation
|
ack on changes to x11.rs, but i do not understand the purpose of the changes to common.rs and what issue it is supposed to fix. Can you elaborate? |
|
It's linked changes. Just adding WantMore isn't enough, because
Moving |
|
@WhatAmISupposedToPutHere I have elaborated on the changes to |
|
Okay, took me a while, but i understand that change now. |
|
@WhatAmISupposedToPutHere format test failed, fixed formatting. Should I squash commits and force push? |
|
Yep, squash all the things. |
Signed-off-by: Ilya Chelyadin <ilya77105@gmail.com>
53bf958 to
d4e8c55
Compare
|
Squashed. |
|
@WhatAmISupposedToPutHere @teohhanhui do you think we should do a patch release including this one? |
|
Since this issue has been present for a year without being noticed, I think it’s reasonable to include it in the next regular release rather than issuing a separate patch release. |
Makes sense, thanks! |
Motivation
X11 clients occasionally caused muvm to panic in the XQueryExtension handling code when messages were split across multiple socket reads. The issue was first uncovered when running
winecfginside the VM, as it triggered XQueryExtension request forXFIXESwhen a window received mouse focus.Panic happens in extension name processing code:
This happened because
process_socket_recv()incorrectly sliced the buffer, dropping previously accumulatedrequest_headbytes.X11ProtocolHandler::process_send_stream()assumed the entire request was present, leading to out-of-bounds panics when only partial data arrived.What this patch does
process_socket_recv()to correctly includerequest_headbytes in the buffer passed toprocess_send_stream().request_tail) without consuming the entire buffer, preserving leftovers for the next read.Result