keepassxreboot / keepassxc

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

Crash on lockscreen when using Pageant #10828

Open Mat2095 opened 1 month ago

Mat2095 commented 1 month ago

Overview

KeePassXC crashes on Windows after waking up from sleep, on the lockscreen, when using Pageant

Steps to Reproduce

  1. Run KeePassXC and unlock database, have Pageant configured
  2. Send PC to sleep
  3. Wake PC up

Expected Behavior

Nothing, KeePassXC should continue running

Actual Behavior

KeePassXC crashes often in this situation. If it crashes, it might show a message like this, or it might crash silently:

Screenshot 2024-05-29 201138

Context

It doesn't crash if the database is locked before sleeping. I'm using SSH-Agent with both OpenSSH and Pageant (I have some keys that I add to them upon unlocking the database). I found that disabling Pageant (and using either OpenSSH only or none) always prevents the crash. When having Pageant enabled (either with OpenSSH or alone), it "often" (maybe 50-90 percent) crashes. I'm using Pageant Release 0.81. As mentioned before, the crash is not completely reliable, so I can't be completely certain that Pageant/Pageant-Integration causes the issue.

Debug-info

KeePassXC - Version 2.7.8 Revision: f6757d3

Qt 5.15.11 Diagnosemodus ist deaktiviert.

Betriebssystem: Windows 11 Version 2009 CPU-Architektur: x86_64 Kernel: winnt 10.0.22631

Aktivierte Erweiterungen:

Kryptographische Bibliotheken:

Operating System: Windows

droidmonkey commented 1 month ago

Unfortunately I cannot replicate this at all. Can you provide any additional details or steps?

I did the following:

  1. Have Pageant running and OpenSSH running
  2. Set an SSH Agent entry to load a key on unlock and remove it on lock
  3. Locked database
  4. Unlock database, confirm key in pageant and openssh agent
  5. Put computer to sleep (and also tried hibernate)
  6. Wake
  7. Database is locked and key is not in pageant nor openssh agent, no crash

I did this 20 times

Mat2095 commented 1 month ago

Thanks for looking into this. So it seems there is something else required for the crash to occur, that I am unaware of. I'll try to find it, maybe I can reproduce it on another machine.

Mat2095 commented 1 month ago

Just a quick update, I haven't managed to find what causes the issues yet. On my second machine I couldn't make it crash. But I found out two things: