Bug 1300178 - dm-tool insecure lock, use light-locker instead
dm-tool insecure lock, use light-locker instead
Status: NEW
Product: Fedora
Classification: Fedora
Component: xfce4-session (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
: FutureFeature, Patch
Depends On:
  Show dependency treegraph
Reported: 2016-01-20 02:23 EST by Aleksandar Kostadinov
Modified: 2016-03-24 10:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Aleksandar Kostadinov 2016-01-20 02:23:30 EST
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:
Comment 1 Aleksandar Kostadinov 2016-01-20 02:34:02 EST
Here's a debian bug, it looks like dm-tool lock has been removed upstream?
Comment 2 Aleksandar Kostadinov 2016-01-20 04:14:37 EST
Looking at changeset:

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 06:15:24 EST
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 06:35:09 EST
Here's upstream bug with attached patch:

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 09:39:57 EDT
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 10:14:00 EDT
@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 10:35:03 EDT
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.

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