[Security issue] LM19: Desktop won't lock after suspend

Forum rules
Before you post please read how to get help
Post Reply
jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

[Security issue] LM19: Desktop won't lock after suspend

Post by jeenuv » Wed Jul 18, 2018 1:13 pm

I upgraded from 18.3 to 19 (64-bit). I just found out that, once I resume from laptop suspend, I'm not always taken to the login screen. Sometimes it does; other times, I'm directly taken to the unlocked desktop. Once the latter happens, I'm unable to lock the desktop at all - Ctrl+Alt+L has no effect.

This never happened on 18.3.

I've attached the output from inxi. Please let me know if I can provide more details to help debug.
Attachments
inxi.log.gz
(1.33 KiB) Downloaded 25 times
Last edited by jeenuv on Tue Jul 24, 2018 4:30 pm, edited 1 time in total.

KBD47
Level 7
Level 7
Posts: 1630
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 » Wed Jul 18, 2018 2:31 pm

I'm working from memory here as I don't have my Mint Mate 19 install in front of me, but check your power management and screensaver settings and look for a 'lock screen' toggle and after you set that see if it asks for password after suspend.
BTW in the future you can just copy and paste the output of your terminal results in your post between:
</> it is easier than downloading and opening your terminal output.
Thanks.

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Wed Jul 18, 2018 2:36 pm

I'm afraid I don't have any settings related to locking screen in power management. But as I mentioned, the screen does lock sometimes, so I think it's asked to do it by default, but won't at times.

KBD47
Level 7
Level 7
Posts: 1630
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 » Wed Jul 18, 2018 3:04 pm

jeenuv wrote:
Wed Jul 18, 2018 2:36 pm
I'm afraid I don't have any settings related to locking screen in power management. But as I mentioned, the screen does lock sometimes, so I think it's asked to do it by default, but won't at times.
OK, I fired up my Mint 19 MATE laptop. Under control center, screensaver preferences are both of those boxes ticked: activate screensaver and lock screen? What time do you have it set to come on? If you are coming back up from suspend before screensaver kicks in, that might be why it is sometimes asking you, and other times not asking for your password.

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Wed Jul 18, 2018 3:52 pm

It's set to 5 minutes, and had always been (including my previous 18.3). My understanding is that it's the time the computer is required to be idle before screen saver kicks in, and nothing else.

While checking this out, I tried launching "Login Window" menu item, but it wouldn't. Then I ran "pkexec lightdm-settings" from the command line, and it launched as usual. Interestingly, I'm able to lock my screen with Ctrl+Alt+L after this. I also tried to suspend after resume, and I was taken to the login screen this time.

I'm not sure if that's just a coincidence.

KBD47
Level 7
Level 7
Posts: 1630
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 » Wed Jul 18, 2018 4:05 pm

Upgrading is always a bit tricky when moving from one major release to another. It is possible something got borked during the upgrade, and moving to 19 was a big upgrade. I don't have any other suggestions other than if it is really a big issue with you, backing up everything and doing a fresh install of 19 should set it straight, at least I haven't had any issues with suspend and asking for login on Mint MATE 19.
Also if you are patient a bit perhaps someone else will have insight into something else to try. Sorry I couldn't help you more.

User avatar
gpunktschmitz
Level 1
Level 1
Posts: 9
Joined: Sat Sep 07, 2013 3:34 am
Contact:

Re: LM19: Desktop won't lock after suspend

Post by gpunktschmitz » Sat Jul 21, 2018 10:55 am

I too have this very same behaviour with a fresh installation.

For what I noticed the suspend and lock works perfect when only on battery.

1. lid closed
--> suspend
2. lid opened
--> screen locked

but when removing ac while in the dock/on ac with lid closed the laptop suspends as expected but when powered on there is no lock screen - and as jeenuv pointed out: it is no longer possible to lock the screen at all.

I have compared my settings (dconf:org/mate/power-manager and dconf:org/mate/screensaver) with my 18.3 installation as I also upgraded my HDD and can confirm this is a very annoying bug.

somebody please look into this and let me know if there is anything I can do to help.

User avatar
gpunktschmitz
Level 1
Level 1
Posts: 9
Joined: Sat Sep 07, 2013 3:34 am
Contact:

Re: LM19: Desktop won't lock after suspend

Post by gpunktschmitz » Sat Jul 21, 2018 11:24 am

I just did some more testing:

on battery:
several times "lid close/lid open" works just fine.

in state "suspend" (from battery) attached ac:
when I open the lid it also works just fine -> lock screen appears as expected

in state "suspend" (from battery) into dock:
as soon as I put the suspended laptop in the dock and power it on there is no lock screen but my last session.
also it is not possible to lock the screen at all (when resuming from suspend).

so I thought why not manually lock the laptop as a workaround:
1. I restarted the laptop while in the dock (and lid closed)
2. manually locked the device
3. moved the mouse to see the lock screen and unlocked the device
4. locked the device manually again
5. moved around with the mouse and unlocked the lock screen

great - I thought - now for the real life test:
6. locked the device manually
7. undocked the laptop from the docking station
8. opened the lid and there is no lock screen

this is IMHO a major security issue which I can only avoid by shutting down the laptop.

please advice on how to escalate this issue.

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Sun Jul 22, 2018 2:51 am

Having rebooted since it happened to me, I reproduced this behavior again. Here's the sequence:

* Resume from suspend. I'm using my laptop screen only at this point. I'm taken to login screen. So far so good.
* Plug a my main monitor in, and voila, by the time the new display is switched (I had configured my big monitor as my main display, and to turn off the laptop display), I'm logged in automatically!

From this point onward, l'm unable to lock my screen. However, if I open "Configure display" and turn on my laptop display, the system locks itself again. And from that point onward, I'm able to lock the screen too.

So it feels as if the lock screen is tied to a particular display in use. As long as you switch away from the display where the login screen is displayed, you can get in for free. This, to me, is a security issue, and I'd like this to be escalated. But I'm not sure how...

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Sun Jul 22, 2018 3:12 am

I've reported a bug on the mate-control-center package, which is what contains the mate-display-properties command: https://github.com/mate-desktop/mate-co ... issues/366.

User avatar
smurphos
Level 8
Level 8
Posts: 2225
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: LM19: Desktop won't lock after suspend

Post by smurphos » Sun Jul 22, 2018 3:16 am

I think this issue on the Mate github is also relevant -

https://github.com/mate-desktop/mate-sc ... issues/158

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Sun Jul 22, 2018 3:26 am

Indeed. My report on control center has been closed, and I've been pointed to the screen saver issue instead. I've subscribed to it. Given its severity, and that nobody has responded to it for a month, I don't see it getting fixed anytime soon.

fromWinToLin
Level 2
Level 2
Posts: 77
Joined: Thu Nov 19, 2009 11:53 am

Re: LM19: Desktop won't lock after suspend

Post by fromWinToLin » Tue Jul 24, 2018 9:18 am

This is crazy! I was just about to post how this used to be an issue for me under Linux Mint 18.3 (Cinnamon), and now I am on Mint 19 (Cinnamon.) I logged into this forum to post a link to a very similar issue: viewtopic.php?t=236157

Want the know the irony of it? I am using my laptop, right now, after having resumed from suspend and I was never asked to unlock my session! No password needed, no lockscreen! Prior to today, it would behave as expected: any time I close the lid or suspend the laptop, I would need to unlock my session with a password. Typical lockscreen behavior. Yet today, I am met with a fully accessible session without needing to unlock anything!

This is a HUGE security issue, and it had plagued some of us back on Mint 18.3. I have never experienced this, EVER, on any other distro. I thought the problem was unique to Cinnamon, but you are saying that it happens on MATE as well?

fromWinToLin
Level 2
Level 2
Posts: 77
Joined: Thu Nov 19, 2009 11:53 am

Re: LM19: Desktop won't lock after suspend

Post by fromWinToLin » Tue Jul 24, 2018 9:36 am

UPDATE: It just did it again!

1) Suspended my laptop.

2) Opened the lid.

3) The system fully powers on.

4) I am greeted to the "lock screen" which shows me a clock and the current time.

5) After a few seconds, I have access to my entire system, no password or unlock needed!

THIS IS A MAJOR SECURITY ISSUE. It cannot be stressed enough. Something about Mint's screenlockers (whether Cinnamon or MATE) has this peculiar and critical issue. I'm not a programmer, so I couldn't say what chunk of code is responsible for it.

Even if I try to manually lock the screen (menu or shortcut keys), it will only SHOW the lock screen, but it will NOT ask for a password. Simply moving the mouse allows access to the session again!

Now I am able to reproduce this bug over and over and over until I reboot the entire system.

jeenuv
Level 2
Level 2
Posts: 63
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv » Tue Jul 24, 2018 1:50 pm

I dont't think there's any doubt that this issue is real or reproducible. I however doubt this issue is given the weight it deserves. Perhaps we should be voicing this on the Github issue(s) linked above instead.

User avatar
smurphos
Level 8
Level 8
Posts: 2225
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: LM19: Desktop won't lock after suspend

Post by smurphos » Wed Jul 25, 2018 12:02 am

fromWinToLin wrote:
Tue Jul 24, 2018 9:36 am
Now I am able to reproduce this bug over and over and over until I reboot the entire system.
Can you provide output from cat ~/.xsession-errors and check for any cinnamon-screensaver crash reports in the System Reports settings module.

Is your system upgraded to 19 from 18.3 or a fresh install? I've tried and failed to reproduce this on fresh install. I can cause lock on suspend to fail entirely via https://github.com/linuxmint/cinnamon-s ... /issues/25, but only specifically by shutting the lid with a context menu open.

This might be relevant - https://github.com/linuxmint/cinnamon-s ... issues/194 as may this https://github.com/linuxmint/cinnamon-s ... issues/219 - please MTWebster responses for steps that might help in troubleshooting.

Please also report output of inxi -Fxz - just in case this is hardware / graphics driver related.

And just a sanity check - you have got 'Lock the Computer when put to sleep' checked in Screensaver settings?

Image

fromWinToLin
Level 2
Level 2
Posts: 77
Joined: Thu Nov 19, 2009 11:53 am

Re: [Security issue] LM19: Desktop won't lock after suspend

Post by fromWinToLin » Wed Jul 25, 2018 7:32 am

smurphos, I will add additional information, but I since I am in a rush now, I will reply quickly some things I noticed.

I had to reboot. I could have refreshed Cinnamon, and restarted the cinnamon-screensaver process. I decided to do a full reboot. What has been the case since Mint 18 through 18.3, and now through 19, is there is a "decay" with the Cinnamon desktop which seems to affect multiple parts of it if the user goes through a long period of time between reboots: lock screen issues, suspend issues, audio issues, random settings being reverted, memory leak and overall creeping of sluggishness over time. This experience has been unique for me only with Mint (starting with the 18.x family through to 19.)

I was going to record a video of it on my iPhone, but seeing as some issues are very long-standing (or denied, or hard to diagnose), I just don't have the energy to go through another rigorous bug reporting process: I have never had success with any bug report, no matter how much information I give or how much diagnoses I do. (With any open source project.)

This is even trickier, since it could be random and seems to take some time to develop over normal computer usage.

Before I rebooted, it got to the point where I couldn't even suspend or lock the screen anymore, and my audio stpped working, and my touchpad settings reset on their own. Once I rebooted, everything went back to normal: touchpad settings, suspend behavior, lock screen behavior, system performance, working audio. I am familiar with the bug report you posted, as well as one I made on the Mint launchpad site. This does indeed affect other users, and perhaps even more, just because of how sneaky and hard it is to reproduce.

Another one, for reference: https://bugs.launchpad.net/cinnamon-pro ... ug/1652489

As you can see, even the developers don't exactly pinpoint the issue. It was marked as "Fix released" but I believe some of the code was fixed which didn't really address the issue, but rather addressed something else? A "solution" is to just use xscreensaver.

Now reading this post, it appears MATE is also affected.

Post Reply

Return to “MATE”