Remote desktop is automatically enabled after login

Bug #1971415 reported by Martin Zurowietz
264
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
High
Jeremy Bícha
Jammy
Fix Released
High
Unassigned

Bug Description

Details:
Turning off RDP Remote Desktop Sharing with gnome-control-center would only turn off RDP sharing for the current session. Upon logging back in, RDP Sharing would be enabled again without any additional user interaction or notification.

Other Info:
As mentioned in the comments at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1825
this issue could have been avoided if Ubuntu's gnome-remote-desktop didn't keep the systemd user service always running. I do intend to fix that issue also but it is a more complicated fix. I think it will require a maintainer script to remove the automatic conffiles added by dh. I will do the gnome-remote-desktop bugfix as a normal non-security SRU.

Original Bug Report:
If I disable sharing/remote desktop in GNOME Control Center, then log out and back in, it is automatically enabled again. I report this as a security vulnerability because remote desktop is enabled without the user's knowledge.

Software versions:
- Ubuntu 22.04
- gnome-remote-desktop 42.0-4ubuntu1
- gnome-control-center 1:41.4-1ubuntu13

Steps to reproduce:
1. Start with Remote Desktop enabled. "systemctl --user status gnome-remote-desktop.service" reports "active (running)".
2. Disable Remote Desktop in Control Center. systemctl reports "inactive (dead)".
3. Log out and back in.
4. Open Control Center. Remote Desktop is enabled again. systemctl reports "active (running)".

Expected behavior:
Remote Desktop should stay disabled upon the new login.

Actual behavior:
Remote Desktop was automatically enabled again.

Previous discussion: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1775#note_1443319

CVE References

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Probably this is a duplicate, feel free to break the duplication if it isn't. Thanks

information type: Private Security → Public Security
Revision history for this message
Martin Zurowietz (mzur) wrote (last edit ):

It sounds related but as far as I can tell, it is not a duplicate of [1]. I can produce the erroneous behavior with g-c-c 1:41.4-1ubuntu13 (that includes the fix for [1]).

The issue boils down to this: I disable Remote Desktop in the control center. I log out and back in. Remote Desktop is enabled again (both the service and the switch in the control center).

[1] https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1969619

Revision history for this message
Sebastien Bacher (seb128) wrote :

Debian and Ubuntu auto-enable installed systemd unit in their packages, which is different from what RH is doing.

If that 's not wanted here then we should probably force disable it, as in https://launchpad.net/ubuntu/+source/gamemode/1.5.1-0ubuntu2

Note that there is still a gnome-control-center issue probably here since it should be able to override /etc/systemd/user/gnome-session.target.wants/gnome-remote-desktop.service

Changed in gnome-remote-desktop (Ubuntu):
assignee: nobody → Jeremy Bicha (jbicha)
importance: Undecided → High
Revision history for this message
Steve Beattie (sbeattie) wrote :

Jeremy, is there any progress on this?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I'm reassigning to gnome-control-center. Still doing further investigating.

affects: gnome-remote-desktop (Ubuntu) → gnome-control-center (Ubuntu)
Changed in gnome-control-center (Ubuntu):
status: New → Triaged
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu):
status: Triaged → Fix Committed
Changed in gnome-control-center (Ubuntu Jammy):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jeremy Bícha (jbicha) wrote :
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:41.4-1ubuntu14

---------------
gnome-control-center (1:41.4-1ubuntu14) kinetic; urgency=medium

  * Add patch to turn off RDP gsettings key when turning off RDP (LP: #1971415)

 -- Jeremy Bicha <email address hidden> Tue, 10 May 2022 22:01:31 -0400

Changed in gnome-control-center (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

The unit change mentioned before wasn't the right reference, http://launchpadlibrarian.net/449200364/rygel_0.38.1-2ubuntu3.1_0.38.1-2ubuntu3.2.diff.gz is a better example

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

This patch is still broken. The same thing happens with VNC:

1- Turn on remote desktop, turn on VNC.
2- Only turn off remote desktop while leaving VNC checked
3- Reboot
4- The VNC port is listening to connections even though remote desktop says off in the control center.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Here's an updated debdiff to also handle VNC. The debdiff is against the version already in jammy.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:41.4-1ubuntu13.2

---------------
gnome-control-center (1:41.4-1ubuntu13.2) jammy-security; urgency=medium

  * Add patches to turn off RDP & VNC gsettings keys when turning off
    Remote Desktop Sharing (LP: #1971415)
    - CVE-2022-1736

 -- Jeremy Bicha <email address hidden> Wed, 18 May 2022 08:52:00 -0400

Changed in gnome-control-center (Ubuntu Jammy):
status: Confirmed → Fix Released
Revision history for this message
Martin Zurowietz (mzur) wrote :

I have g-c-c 1:41.4-1ubuntu13.2 installed but I'm not sure if the fix works properly. If I start with Remote Desktop enabled and then disable it in g-c-c, systemctl reports gnome-remote-desktop.service as "inactive (dead)". If I log out and in again, g-c-c still has Remote Desktop disabled (differently to what I originally reported). However, gnome-remote-desktop.service is now "active (running)" again.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Martin that's bug #1973028

Revision history for this message
Martin Zurowietz (mzur) wrote :

@Sebastien I see, thanks!

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.