Bug 1300178 - dm-tool insecure lock, use light-locker instead
Summary: dm-tool insecure lock, use light-locker instead
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: lightdm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Alternative GTK desktop environments
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-20 07:23 UTC by Aleksandar Kostadinov
Modified: 2023-02-16 09:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Aleksandar Kostadinov 2016-01-20 07:23:30 UTC
Description of problem:
Using XFCE with dm-tool lock results in insecure locking of x session that one can circumvent using ctrl+alt+F1

Version-Release number of selected component (if applicable):
lightdm 1.10.5

How reproducible:
not sure


Steps to Reproduce:
1. upgrade from XFCE fedora 21 to fedora 23 using DNF system upgrade path
2. xfconf-query -c xfce4-session -p /general/LockCommand -s "dm-tool lock" --create -t string
3. logind.conf add some ttys (e.g 11)
4. use xfce4-whiskermenu-plugin to lock screen
5. ctrl+alt+F1

Actual results:
see unlocked XVFE session

Expected results:
see locked screen

Additional info:
I find that installing and running `light-locker` package does fix the issue and session is securely locked. I beliee this is a security issue and dm-tool should always depend on some sceensaver + raise error if no screensaver to actually lock the screen is available. Otherwise one may think the screen is locked while it is not really locked. Or remove the `dm-tool` lock functionality as it is misleading user that that screen is locked while it isn't.

Additionally see #1. I am absolutely sure my fedora 21 installation was locking screen properly somehow (I can't rememeber what I used at that time. After upgrade locking magically stopped working so I started to search for a XFCE specific tool to lock screen and found dm-tool. There was no indication whatsoever that it doesn't properly lock until I started switching ttys for unrelated reasons.

Here's a related ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/lxsession/+bug/1205384

Comment 1 Aleksandar Kostadinov 2016-01-20 07:34:02 UTC
Here's a debian bug, it looks like dm-tool lock has been removed upstream?
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740163

Comment 2 Aleksandar Kostadinov 2016-01-20 09:14:37 UTC
Looking at changeset:
http://bazaar.launchpad.net/~ubuntu-branches/debian/sid/lxsession/sid/revision/15

I see the change was to remove dm-tool from lxlock. But I don't even have that binary in my fedora 23. I think we should have by default installed on XFCE light-locker and lxlock or hwatever needed to lock the screen.

Comment 3 Aleksandar Kostadinov 2016-01-20 11:15:24 UTC
I think the fix actually should be:
* install light-locker mandatory with XFCE (or some other compatible screensaver)
* make xflock4 use the installed screensaver for locking:
  * https://bugzilla.xfce.org/show_bug.cgi?id=3770
  * https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/1254366

Comment 4 Aleksandar Kostadinov 2016-01-20 11:35:09 UTC
Here's upstream bug with attached patch:
https://bugzilla.xfce.org/show_bug.cgi?id=12415

The thing that fedora maintainer need to do is add extra dependencies such that light-locker is installed as a dependency of xfce4-session. Or some other supported alternative screen locker.

Comment 5 Rex Dieter 2016-03-24 13:39:57 UTC
triaging to xfce-session

(with my lightdm maintainer hat on, I'm tempted to just remove dm-tool from lightdm, as far as I can tell, I don't think it works as advertised)

Comment 6 Aleksandar Kostadinov 2016-03-24 14:14:00 UTC
@Rex, +1 for removing that dm-tool. Btw I eventually switched off light-locker because it caused switching consoles and once I lock, closing te laptop lid could not suspend the laptop because of consolekit maybe.. not sure. Also I was unable to switch to tty12 to see my system log like I like to do sometimes. IIRC switching consoles caused screen to lock.

Removing light-locker and using gnome-screensaver works like a charm though as it doesn't cause any tty switching. So my vote goes to gnome-screensaver.

Comment 7 Kevin Fenzi 2016-03-24 14:35:03 UTC
Well, the default Xfce group/live install has xscreensaver, which should get started by default and be called by xflock4 to lock the screen. 

If you want to use light-locker you can by setting the xfconf key. 

Is there any advantage to light-locker over xscreensaver -lock?

gnome-screensaver is not a viable option for Xfce. It will never lock on Xfce (unless forced) because the way it tells idle is by pings to gnome-session. This could result in someone thinking they are locking their screen automatically after N minutes, but it never happening.

Comment 8 Kevin Fenzi 2020-04-20 00:01:12 UTC
Moving this back to lightdm... if the lightdm maintainers want to remove dm-tool, thats fine. I dont think there's anything for me to do here.

Comment 9 leigh scott 2020-04-20 00:25:06 UTC
File the issue upstream

https://github.com/canonical/lightdm/issues


Note You need to log in before you can comment on or make changes to this bug.