omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Lock screen can expose password text after failed authentication

Open evo-social-world opened this issue 3 months ago • 2 comments

System details

AMD Ryzen 9 9950X3D, NVIDIA GeForce RTX 5090 D, Omarchy 4.0.0-1 (stable), kernel 7.1.7-arch1-1, Hyprland 0.56.2-1, quickshell-git 0.3.0.r20.g28771c7-1, Qt 6.11.1, fcitx5 5.1.21 with Rime.

What's wrong?

On Quattro's Quickshell lock screen, password masking can fail after an unsuccessful authentication attempt. The first attempt is shown as dots. After PAM reports Authentication failed, typing the next attempt can render the actual characters instead of dots. The password still authenticates, so this is a credential-disclosure issue rather than only a visual glitch.

Steps reproduced on this machine:

  1. Run omarchy system lock or wait for the idle lock.
  2. Enter an intentionally wrong password and press Enter.
  3. Wait for Authentication failed (1).
  4. Type the next password attempt.
  5. The field may show the typed characters in clear text instead of password dots.

Expected: every attempt remains masked, including after any number of PAM failures.

The journal confirms the reported sequence in the Quickshell lock service: two failed omarchy-lock-password PAM sessions followed by a successful one. There were no QML property errors around the failures.

This does not appear to be a local Omarchy customization:

  • pacman -Qkk omarchy reports 1628 total files, 0 altered files.
  • There is no user clone/override of omarchy.lock.
  • ~/.config/omarchy/shell.json only changes bar layout and idle timings.
  • The installed LockView.qml is identical to the quattro branch.

Investigation points to the post-authentication focus/input lifecycle rather than the normal Qt password renderer:

  • LockView.qml hard-codes echoMode: TextInput.Password and passwordMaskDelay: 0.
  • A Qt 6.11.1 isolation test keeps displayText fully masked across the same enabled/readOnly transition.
  • Instantiating Omarchy's exact packaged LockView.qml and simulating the failed-auth transition also keeps echoMode=Password and displayText masked, but leaves the password input with activeFocus=false after authentication finishes.
  • That lost-focus result matches the independently reported lock-screen focus bug in #6858. On this system the shell also uses Fcitx/Rime, so an input-method/preedit path after focus loss is a plausible contributor, but that part is not yet proven.

Security-hardening suggestion:

  1. Re-arm password focus whenever authenticatingPassword changes back to false, as discussed in #6858.
  2. Use TextInput.NoEcho and render password dots separately from passwordText.length, so neither Qt password echo nor input-method preedit can ever render clear text.
  3. Add a graphical regression test covering failed PAM -> refocus -> second attempt, ideally with an input method active.

Related: #6858

evo-social-world avatar Aug 15 '26 06:08 evo-social-world

Local mitigation is now applied and verified through an official user clone of omarchy.lock: the input uses TextInput.NoEcho, a separate dot renderer derives only from password length, and focus is retried after authentication finishes. An exact Quickshell fixture across the failed-auth transition reported displayText="", 14 rendered dots for a 14-character test value, and preserved submittedPassword="second-attempt". The live shell was restarted; plugin validation and lock preview/status passed. This is a user-layer workaround, not a change under /usr/share/omarchy.

evo-social-world avatar Aug 15 '26 06:08 evo-social-world

Closing as a duplicate of #6858, which already reports the real defect here and has a patch.

On the disclosure headline: we could not find a code path that un-masks the field. LockView.qml hard-codes echoMode: TextInput.Password, passwordCharacter: "●" and passwordMaskDelay: 0 as literals — no bindings, nothing that varies with authenticatingPassword or the failed-attempt count. The only other text drawn in that area is the placeholder, which renders placeholderText/failureMessage and is visible only when the field is empty. Both of your own isolation tests report displayText fully masked, which is consistent with that.

What is real is the second half of your report: the field is disabled for the PAM round-trip (enabled: root.inputEnabled && !root.authenticatingPassword) and nothing re-focuses it afterwards — forcePasswordFocus() is only called from onInputEnabledChanged, Component.onCompleted and the background click handler, with no onAuthenticatingPasswordChanged hook. That is exactly the lost-focus state you measured, and #6858's focus-retry timer includes the re-arm you ask for as item 1.

Items 2 and 3 are deliberately not being taken as written. Switching to TextInput.NoEcho would blank displayText, but input-method preedit is drawn through QTextLayout::setPreeditArea independent of echoMode, so it would not obviously suppress a preedit overlay — the half that would actually matter. Both Password and NoEcho already set Qt::ImhHiddenText, which is the correct signal to fcitx5.

If you can get a reproducer with the IME active that shows clear text on screen, please do reopen with it — that would be a different bug from this one and worth chasing properly.

— 🤖 Claude, posting on behalf of @dhh

dhh avatar Aug 15 '26 09:08 dhh