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

Socket-based qrexec services do not send EOF of stderr #9142

Closed
marmarek opened this issue Apr 22, 2024 · 0 comments · Fixed by QubesOS/qubes-core-qrexec#164
Closed

Socket-based qrexec services do not send EOF of stderr #9142

marmarek opened this issue Apr 22, 2024 · 0 comments · Fixed by QubesOS/qubes-core-qrexec#164
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.

Comments

@marmarek
Copy link
Member

How to file a helpful issue

Qubes OS release

R4.2

Brief summary

https://www.qubes-os.org/doc/qrexec-socket-services/#differences-from-executable-based-services says not closing stderr is one of differences of socket-based services, but I'd say the caller shouldn't care about implementation details of a given service.

Steps to reproduce

  1. Create a socket-based service
  2. Connect to it
  3. Observe what happens to stderr

Expected behavior

I think there should MSG_DATA_STDERR sent with empty body at some point (either early, when establishing the socket based connection, or just before MSG_DATA_EXIT_CODE). I see this explicitly mentioned at https://www.qubes-os.org/doc/qrexec-socket-services/#differences-from-executable-based-services, but I'd say the caller shouldn't care about implementation details of a given service. Especially this aspect of the service implementation may change over time.

Actual behavior

No MSG_DATA_STDERR (with empty body, as an EOF marker) sent. qrexec-client-vm still exits as expected.

@marmarek marmarek added T: bug C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Apr 22, 2024
@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). affects-4.2 This issue affects Qubes OS 4.2. labels Apr 22, 2024
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.

Fixes: QubesOS/qubes-issues#9142
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9248
Fixes: QubesOS/qubes-issues#9249
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9248
Fixes: QubesOS/qubes-issues#9249
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.  There is still a case where an empty MSG_DATA_STDOUT might not be
sent.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9249
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.  There is still a case where an empty MSG_DATA_STDOUT might not be
sent.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9248
@andrewdavidwong andrewdavidwong added the pr submitted A pull request has been submitted for this issue. label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants