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

Add missing GUI daemon options #221

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

DemiMarie
Copy link
Contributor

@DemiMarie DemiMarie commented Aug 31, 2022

subwindows= was added in GUI daemon commit QubesOS/qubes-gui-daemon@5978391 and override_redirect= was added in commit QubesOS/qubes-gui-daemon@cd6f308. Allow them to be set via qvm-features.

@DemiMarie DemiMarie force-pushed the missing-gui-daemon-flags branch 4 times, most recently from 210bcc1 to 077275f Compare September 1, 2022 00:36
@DemiMarie
Copy link
Contributor Author

PipelineRetryFailed

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #221 (4f20c1d) into master (90c9973) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #221   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files          51       51           
  Lines        7788     7788           
=======================================
  Hits         5855     5855           
  Misses       1933     1933           
Impacted Files Coverage Δ
qubesadmin/tools/qvm_start_daemon.py 51.64% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

DemiMarie added a commit to DemiMarie/qubes-gui-daemon that referenced this pull request Sep 29, 2022
This was supposed to be done in 157ca14,
but the implementation was wrong: it set the override-redirect flag to
what the GUI daemon thought the current value was, not 0.  Therefore,
the GUI daemon could become confused as to the override-redirect state
of a window.

This turns out not to be exploitable in practice unless subwindows are
enabled.  With subwindows disabled, it is not possible to prevent the
window from being marked as docked, which prevents moving, resizing, or
mapping the window.  Since the window cannot be mapped by the VM, it
cannot appear on screen unless the embedder tells the GUI daemon to map
it.  The embedder will resize the window before sending this message, so
there is no window of vulnerability.

Furthermore, subwindows are disabled in the default configuration.
Because QubesOS/qubes-core-admin-client#221 has not been merged, it is
not possible to turn them on with qvm-features.  Turning them on
manually (by editing qvm-start-daemon or similar) is not supported.

Fixes: 157ca14 ("Unset override-redirect flag when docking, instead of preventing dock")
DemiMarie added a commit to DemiMarie/qubes-gui-daemon that referenced this pull request Sep 29, 2022
The code had security problems (QubesOS#119), could not
be enabled (QubesOS/qubes-core-admin-client#221), and was involved in
one exploit for QSB#072.  Furthermore, there are no known users: neither
the Linux nor the Windows GUI agent use subwindows, and the Wayland GUI
agent doesn't use them either.  In short, subwindows support seems to
cause nothing but problems, so just rip it out.
subwindows= was added in GUI daemon commit
QubesOS/qubes-gui-daemon@5978391
and override_redirect= was added in commit
QubesOS/qubes-gui-daemon@cd6f308.
Allow override_redirect= to be set with qvm-features.  subwindows= is
deliberately *not* allowed to be set, because it turns out to be
insecure (QubesOS/qubes-gui-daemon#119).
DemiMarie added a commit to DemiMarie/qubes-gui-daemon that referenced this pull request Oct 16, 2022
The code had security problems (QubesOS#119), could not
be enabled (QubesOS/qubes-core-admin-client#221), and was involved in
one exploit for QSB#072.  Furthermore, there are no known users: neither
the Linux nor the Windows GUI agent use subwindows, and the Wayland GUI
agent doesn't use them either.  In short, subwindows support seems to
cause nothing but problems, so just rip it out.
@marmarek marmarek merged commit b30b303 into QubesOS:master Oct 17, 2022
@DemiMarie DemiMarie deleted the missing-gui-daemon-flags branch October 17, 2022 15:28
marmarek pushed a commit to QubesOS/qubes-gui-daemon that referenced this pull request Oct 17, 2022
This was supposed to be done in 157ca14,
but the implementation was wrong: it set the override-redirect flag to
what the GUI daemon thought the current value was, not 0.  Therefore,
the GUI daemon could become confused as to the override-redirect state
of a window.

This turns out not to be exploitable in practice unless subwindows are
enabled.  With subwindows disabled, it is not possible to prevent the
window from being marked as docked, which prevents moving, resizing, or
mapping the window.  Since the window cannot be mapped by the VM, it
cannot appear on screen unless the embedder tells the GUI daemon to map
it.  The embedder will resize the window before sending this message, so
there is no window of vulnerability.

Furthermore, subwindows are disabled in the default configuration.
Because QubesOS/qubes-core-admin-client#221 has not been merged, it is
not possible to turn them on with qvm-features.  Turning them on
manually (by editing qvm-start-daemon or similar) is not supported.

Fixes: 157ca14 ("Unset override-redirect flag when docking, instead of preventing dock")
(cherry picked from commit a91639e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants