keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.94k stars 1.45k forks source link

Opening KeePassXC triggers udev REMOVE event on YubiKey #10888

Closed robin-checkmk closed 3 months ago

robin-checkmk commented 3 months ago

Overview

Starting with KeePassXC 2.7.8, whenever I open KeePassXC, it triggers an udev REMOVE event. I have set up my system, so that when I remove my YubiKey, it locks the screen. Hence, opening KeePassXC licks my session.

Steps to Reproduce

  1. Configure your system as outlined in "Context".
  2. Start KeePassXC.
  3. See locked screen.

Expected Behavior

Nothing should happen.

Actual Behavior

YubiKey gets removed and reconnected.

Context

Config:

# cat /etc/udev/rules.d/80-yubikey-lockscreen.rules
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="/bin/sh -c '/bin/loginctl lock-sessions'"

Log:

Jun 12 13:16:50 localhost /usr/libexec/gdm-x-session[20607]: (II) event21 - Yubico YubiKey OTP+FIDO+CCID: device removed

KeePassXC - Version 2.7.8 Revision: f6757d3

Operating System: Ubuntu 22.04 Desktop Env: Gnome Windowing System: X11

droidmonkey commented 3 months ago

https://github.com/keepassxreboot/keepassxc/issues/10077#issuecomment-2047444637

robin-checkmk commented 3 months ago

I searched and missed. :see_no_evil: Thanks for linking!

phoerious commented 3 months ago

This has come up quite often now. I think one should consider submitting a big report to distort to fix their default rule files.

thorian93 commented 3 months ago

I am not sure, I follow: Who should fix which rules?

droidmonkey commented 3 months ago

Whomever is supplying these yubikey rules to lock the screen on remove. They are not correct in that they are too broadly triggered even when merely using the yubikey.

thorian93 commented 3 months ago

Ah! Gotcha! Well, I have seen several guides, but I will follow up with the ones I can find again. :+1: