Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up`qrexec-client-vm \$dispvm` loses stderr, while `qrexec-client-vm dispN` works fine #2181
Comments
marmarek
added
bug
C: core
P: minor
labels
Jul 18, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jul 18, 2016
Member
This is caused by the way how DispVM is started in Qubes 3.x. Basically opening DispVM is a service call to dom0, then dom0 calls a service in newly created DispVM. And services called to dom0 do not return stderr, to not leak any sensitive data by mistake.
While it is possible to fix this, I'd say the fix is too intrusive to do it in stable release. But in Qubes 4.0 I think we can change this to be direct VM-VM connection.
|
This is caused by the way how DispVM is started in Qubes 3.x. Basically opening DispVM is a service call to dom0, then dom0 calls a service in newly created DispVM. And services called to dom0 do not return stderr, to not leak any sensitive data by mistake. |
marmarek
added this to the Release 4.0 milestone
Jul 18, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rustybird
Jul 18, 2016
Is there by any chance a workaround if stderr is supposed to end up in dom0 anyway? I'm (essentially) doing the following in dom0 for split dm-crypt:
outer_dvm=$(qfile-daemon-dvm LAUNCH dom0 '' red)
...
qvm-run --pass-io "$outer_dvm" 'qrexec-client-vm \$dispvm getKeyFromLuksHeader <header >key'
So the outer dvm receives the dm-crypt key from the inner dvm, while dom0 is supposed to see the inner dvm's cryptsetup prompts etc. on stderr as they happen.
rustybird
commented
Jul 18, 2016
|
Is there by any chance a workaround if stderr is supposed to end up in dom0 anyway? I'm (essentially) doing the following in dom0 for split dm-crypt:
So the outer dvm receives the dm-crypt key from the inner dvm, while dom0 is supposed to see the inner dvm's |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jul 18, 2016
Member
If you're doing it from dom0 anyway, you can split the operation into steps:
qvm-run --pass-io "$outer_dvm" 'cat header' | qfile-daemon-dvm getKeyFromLuksHeader $outer_dvm '' red | qvm-run --pass-io "$outer_dvm" 'cat > key'
|
If you're doing it from dom0 anyway, you can split the operation into steps:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rustybird
commented
Jul 18, 2016
|
Thanks, that's probably the sanest way. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Done (for Qubes 4.0) |
rustybird commentedJul 18, 2016
Qubes OS version:
Affected TemplateVMs:
fedora-23
Using the following
qubes.StderrTestRPC service:If I run
qrexec-client-vm \$dispvm qubes.StderrTestto launch a new dvm, the "stderr okay" message is missing.But it is present, as it should be, for any other remote VM. Curiously, this works even for an explicitly named, already running dvm (e.g.
disp12).