-
Notifications
You must be signed in to change notification settings - Fork 11
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
qrexec messages should be chunked #19
Comments
This is specifically for the qrexec protocol? I guess you just need to check the length in |
I'm not sure. The qrexec code rejecting longer messages is here. The Would that handle vchan buffer space? Here's how qrexec checks. I could implement that as a first approximation at least, and then worry about checking space later. |
Well, their API is:
Our API is:
It might be more efficient to chunk the data according to the free space, but I suspect it makes little difference. |
I've implemented a first approximation here https://github.com/reynir/mirage-qubes/tree/chunking. I'm not 100% what to do in case I have tested it with reynir/qubes-mirage-ssh-agent#1 and I can now add 30 keys without a problem. |
That looks right to me. |
I discovered that messages sent to a
qrexec-client-vm
were dropped if the message (without header I believe) was more than 4096 bytes long. I spoke with marmarek about this, and was told that longer messages should be split into chunks and sent separately. Furthermore, I was told that you should check if there was space to write before writing the header; otherwise a deadlock could occur because while waiting for more buffer space the other end would wait for the rest of the message. I haven't figured out how to do that in OCaml.I intend to implement this myself, but I'm stuck and don't have much time lately.
The text was updated successfully, but these errors were encountered: