Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor YubiKey key to avoid deadlock #11703

Merged

Conversation

w15eacre
Copy link
Contributor

@w15eacre w15eacre commented Jan 29, 2025

The application freezes if the Quick Unlock feature is activated, your database uses a composed password (password + YubiKey), and you try to Unlock Database while the YubiKey is unplugged.

This issue is related to a deadlock, which is fixed in this PR.

  • Add mutex to get m_connectedKeys
  • Fix deadlock when the app uses Quick Unlock and the YubiKey is unplugged

steps to reproduce:

  • Create a database(password + yubikey)
  • Activate the Quick Unlock feature
  • Lock the database
  • Unplug yubikey
  • Try to unlock the database

Result: The application freezes.
Expected: The application is working

Screenshots

Screenshot_20250129_025354-1

Testing strategy

Manual Testing

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

- Add mutex to get m_connectedKeys
- Fix deadlock when the app uses Quick Unlock and the YubiKey is unplugged
@droidmonkey droidmonkey added this to the v2.7.10 milestone Feb 1, 2025
@droidmonkey droidmonkey merged commit 81fa8d5 into keepassxreboot:develop Feb 1, 2025
11 checks passed
@w15eacre w15eacre deleted the fix/quick_unlock_deadlock branch February 1, 2025 17:51
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Hardware Keys high priority 🚨 pr: backported Pull request backported to previous release pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants