LUKS password remembered after logout despite “remember until logout” option

Open
#443 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c, linux

Research direction

Start by reproducing the issue with the Disks application and the listed LUKS steps, checking password behavior across logout and login. Trace the Authentication Required dialog and logout handling in cinnamon-settings-daemon. Done means the password is cleared after logout and “Forget password immediately” is selected by default.

Written by the indexing model from the issue text.

Description

It was suggested that I should re-post this issue here. I originally opened it in linuxmint/cinnamon: #13349

There are two main issues:

  1. Password is remembered after logout despite “remember until logout” option
  2. The default option in the authentication dialog is unsafe

Here is the original post:

Distribution

Linux Mint 22.1 Cinnamon

Package version

6.4.8

Graphics hardware in use

No response

Frequency

Always

Bug description

When unlocking a LUKS encrypted external disk (encrypted using the Disks utility,) the option “Remember password until you logout” does not behave as described. If this option is selected, the password is still remembered after logging out of the session. The system only forgets the password after a full shutdown.

Additionally, the option “Remember password until you logout” is preselected by default every time the authentication dialog appears. This is insecure and can easily cause the password to be stored unintentionally.

Steps to reproduce
  1. Encrypt an external disk using LUKS via the Disks application.
  2. Plug the encrypted disk into the system.
  3. When prompted with the “Authentication Required” dialog, enter the password.
  4. Leave the default option “Remember password until you logout” selected.
  5. Log out of the user session.
  6. Log back into the same user account.
  7. Reinsert the disk or attempt to access it again.
Expected behavior

If “Remember password until you logout” is selected, the password should be cleared on logout and a password prompt should appear again after logging back in.

Additionally, the default selection in the authentication dialog should be “Forget password immediately”. Remembering the password should require an explicit user choice, not be enabled by default.

Additional information

This behavior poses a security risk. It is very easy to accidentally confirm the dialog too quickly while the insecure option is preselected, resulting in the password being stored longer than intended. In the worst case, the user must fully shut down the system to clear the stored password.

If the default were instead set to “Forget password immediately”, the worst case scenario would be far less severe: the user would simply need to unplug and plug the disk back in and then explicitly choose to remember the password if desired. This would significantly reduce the impact of accidental confirmation while improving overall security and usability.

Dominant language
C
Stars
71
Forks
75
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/cinnamon-settings-daemon

All issues in linuxmint/cinnamon-settings-daemon

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.