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

AnyDesk 5.5.4 draws a white screen over everything, over all VMs #5731

Closed
juodumas opened this issue Mar 16, 2020 · 7 comments
Closed

AnyDesk 5.5.4 draws a white screen over everything, over all VMs #5731

juodumas opened this issue Mar 16, 2020 · 7 comments
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@juodumas
Copy link

Qubes OS version
Qubes release 4.0

Affected component(s) or functionality
X11/i3-wm

Brief summary
When launched in an AppVM, anydesk-5.5.4 makes the whole screen white without any way to escape. dom0/i3-wm seem to react to input, but the white window overlay cannot be interacted with or closed. All comes back to normal after going to tty2 console and sending pkill -f anydesk to the AppVM.

To Reproduce

  1. Open a Debian 10 AppVM

     wget https://download.anydesk.com/linux/anydesk_5.5.4-1_amd64.deb
     apt install ./anydesk_5.5.4-1_amd64.deb
    
  2. Now the whole screen is white and I cannot switch to any workspace - anydesk service autostarts and draws over everything.

  3. Stop anydesk service from tty2:

     sudo systemctl stop anydesk
     sudo systemctl disable anydesk
    
  4. Start anydesk to reproduce again:

     anydesk
    
  5. Go to tty2, login to dom0 and run this to make X11 usable again:

     qvm-run -p <appvm> 'pkill -f anydesk'
    

Additional context
The issue appeared between anydesk-5.5.1 (works fine) and anydesk-5.5.2 (white screen). In 5.5.2 changelog they write:

Version 5.5.2 Feb 17, 2020
<...>
Refactored X11 code to put much less load on X Server.
Fixed primary monitor not beeing selected on session start.
<...>

Here are xwininfo dumps with anydesk-5.5.1 (working) & anydesk-5.5.2 (not working):

Tested on Linux without Qubes OS and it worked fine.
I will also contact anydesk.com team about the issue.
But it is disconcerting how a window can draw over everything, when normally all windows in my i3-wm setup are confined to their AppVM-related workspaces.

Related, non-duplicate issues
Not sure if this is the same or not: #881

@juodumas juodumas added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Mar 16, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Mar 16, 2020
@m-v-b
Copy link

m-v-b commented Mar 30, 2020

I encountered the same issue, and I developed a mitigation, which also acts as a workaround.

The proposed mitigation works as follows: If a qube/VM creates a window with the override_redirect flag set, and if the window in question covers more than 90% of the screen, then the override_redirect will be unset by the gui-daemon, and a notification is shown on the screen to let the user know about what just happened. The mitigation can be disabled on a per-VM basis.

The mitigation works well enough that I can use AnyDesk to connect to remote computers without issues.

@marmarek, would you be interested in merging such a mitigation to the gui-daemon's repository? If yes, then I can publish a pull request.

As a side note, it looks like AnyDesk creates two windows with override_redirect set; these windows have the same size as the root window. Qubes OS does not prevent the creation of very large windows with override_redirect set, which may enable malicious applications to cause a denial of service.

@m-v-b
Copy link

m-v-b commented Mar 30, 2020

I forgot to ask: @juodumas, were you able to get a response from the AnyDesk team?

@juodumas
Copy link
Author

I forgot to ask: @juodumas, were you able to get a response from the AnyDesk team?

I have asked them about 2 weeks ago but didn't get a response.
I have also noticed that starting anydesk disables X11 keyboard layouts in the target VM and does not restore when closed. So I gave up on anydesk for now, back to VPN + VNC.

@marmarek
Copy link
Member

@marmarek, would you be interested in merging such a mitigation to the gui-daemon's repository? If yes, then I can publish a pull request.

Yes, this would serve as small part of #4705
But there should be a way to disable this, maybe together with the allow_fullscreen configuration option?

@m-v-b
Copy link

m-v-b commented Mar 30, 2020

@juodumas: I appreciate your quick reply. I hope that the AnyDesk team eventually responds.

@marmarek: Sounds good; I will publish a pull request today. I introduced a new configuration option for the gui-daemon named override_redirect_protection. The option is enabled by default, but it can be disabled by setting this option to false in /etc/qubes/guid.conf for a specific VM.

Still, there are two potential problems I see with this approach: (1) I might be adding a redundant option, and (2) despite the informative text I placed in comments in /etc/qubes/guid.conf, the option's name is too technical, not to mention the length of the option's name.

@m-v-b
Copy link

m-v-b commented Sep 5, 2020

Hello @andrewdavidwong and @marmarek,

Given that pull request QubesOS/qubes-gui-daemon#41 has been merged, would you be fine with the closure of this bug? The pull request in question works around this issue sufficiently in my experience. AnyDesk's white/transparent window, which used to cover the whole screen prior to this pull request, is now controllable, and the user can now minimize it. Outgoing remote desktop connections work fine after minimizing the large white window, but I have not tested incoming connections.

Of course, I am assuming that there is not much else that can be done for this issue, which might be incorrect.

@juodumas
Copy link
Author

juodumas commented Sep 5, 2020

I have opened this issue and can confirm that the workaround works for AnyDesk, so I am closing this bug report. The false/empty window that appears after AnyDesk is started is annoying, especially in i3-wm, but I guess there is nothing else that can be done and AnyDesk team did not respond.

Btw., libreoffice is also triggering the override-redirect warning that was merged in QubesOS/qubes-gui-daemon#41, so some users might be confused...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants