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

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

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

Post by jeenuv »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
KBD47
Level 7
Level 7
Posts: 1836
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 »

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: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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: 1836
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 »

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: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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: 1836
Joined: Fri Jul 29, 2011 12:03 am

Re: LM19: Desktop won't lock after suspend

Post by KBD47 »

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: 10
Joined: Sat Sep 07, 2013 3:34 am
Contact:

Re: LM19: Desktop won't lock after suspend

Post by gpunktschmitz »

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: 10
Joined: Sat Sep 07, 2013 3:34 am
Contact:

Re: LM19: Desktop won't lock after suspend

Post by gpunktschmitz »

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: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: LM19: Desktop won't lock after suspend

Post by smurphos »

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

https://github.com/mate-desktop/mate-sc ... issues/158
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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: 87
Joined: Thu Nov 19, 2009 11:53 am

Re: LM19: Desktop won't lock after suspend

Post by fromWinToLin »

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: 87
Joined: Thu Nov 19, 2009 11:53 am

Re: LM19: Desktop won't lock after suspend

Post by fromWinToLin »

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: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: LM19: Desktop won't lock after suspend

Post by jeenuv »

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 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: LM19: Desktop won't lock after suspend

Post by smurphos »

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
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
fromWinToLin
Level 2
Level 2
Posts: 87
Joined: Thu Nov 19, 2009 11:53 am

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

Post by fromWinToLin »

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.
sergiomc

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

Post by sergiomc »

I had the same problem. I follow the instructions to upgrade from linux mint mate 19 to 19.1. So I, turned off the screensaver.
After the upgrade, every time I suspended the laptop, when I came back, the laptop get back online without asking password.
But the solution for me was re-activating the screensaver and its options.

I hope it helps
zmirc

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

Post by zmirc »

As @smurphos said above, Mate is also affected.
It happens to me on a fresh install of 19.1 Mate.

This is such a critical bug, totally opening my laptop to everyone since I'm working in a large office.

Steps: I work on my laptop, then I connect it to an external screen, then I put it to sleep via the sleep laptop/hardware button, then I remove the screen cable (VGA in my case), then I resume from sleep and my laptop opens without requiring a password, and I have full usage capabilities, I can continue my work totally skipping the authentication part.

I also activated the screensaver (seeing the suggestion above), but the issue was still happening.
My screensaver menu looks different since I'm on Mate. (see attachment)
Screenshot at 2019-04-12 10-15-27.png
Seems like there was an Ubuntu update that fixed a similar issue, maybe the same:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1798615

What are we supposed to do? We can't simply drop security like this. Is there a fix in progress for Linux Mint?
Kind regards
randomguy

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

Post by randomguy »

zmirc wrote: Fri Apr 12, 2019 4:23 am As @smurphos said above, Mate is also affected.
It happens to me on a fresh install of 19.1 Mate.

This is such a critical bug, totally opening my laptop to everyone since I'm working in a large office.

Steps: I work on my laptop, then I connect it to an external screen, then I put it to sleep via the sleep laptop/hardware button, then I remove the screen cable (VGA in my case), then I resume from sleep and my laptop opens without requiring a password, and I have full usage capabilities, I can continue my work totally skipping the authentication part.

I also activated the screensaver (seeing the suggestion above), but the issue was still happening.
My screensaver menu looks different since I'm on Mate. (see attachment)
Screenshot at 2019-04-12 10-15-27.png

Seems like there was an Ubuntu update that fixed a similar issue, maybe the same:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1798615

What are we supposed to do? We can't simply drop security like this. Is there a fix in progress for Linux Mint?
Kind regards
LOL. You're supposed to search the site and look for similar issues.

This isn't a new issue, I reported a similar more than a year ago (viewtopic.php?t=261301) and posted a workaround for this issue in viewtopic.php?f=206&t=282743&p=1597568#p1597568 as have others.

I run XScreenSaver and set it to lock after 5min with Power Management enabled. In Startup Applications I added X-Screensaver. Done.
Locked

Return to “MATE”