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

Keepass crashes while decrypting private keys (most of the time) #382

Closed
attisan opened this issue Jan 15, 2023 · 12 comments
Closed

Keepass crashes while decrypting private keys (most of the time) #382

attisan opened this issue Jan 15, 2023 · 12 comments

Comments

@attisan
Copy link

attisan commented Jan 15, 2023

hi, since the last two updates (currently on 0.13.3.0) keepass will crash most of the time while keeagent is Decryping SSH Private Key (actually Decrypting #374) without further notice - it is just gone. How can I assist on debugging this problem? (I have about 20 entries).

@dlech
Copy link
Owner

dlech commented Jan 15, 2023

You can build and run a debug version of KeePass + KeeAgent in Visual Studio, then we can see exactly where the crash is.

@dlech
Copy link
Owner

dlech commented Feb 4, 2023

Or if you can create a new SSH key that triggers the crash and share it here I can have a look.

@shadow00
Copy link

shadow00 commented Feb 5, 2023

Can confirm, I have the same issue (since v0.13, iirc). It happens more frequently (in fact, almost certainly) when my cpu is already under high load (80-90%), to the point that I have to restart keepass several times before it succeeds. I don't think it's related to a specific key, because sometimes it crashes almost immediately, while other times it crashes towards the end (I have 13 ed25519 keys and 4 rsa-4096 keys, most of them with a short comment). It's almost as if it crashes when the operation is taking too long. However, I have no idea if the keys are always loaded in the same order or not, so I don't know for sure that it's not a specific key.

I'm about to try v0.13.4, will report back if I notice any difference.

@dlech
Copy link
Owner

dlech commented Feb 5, 2023

I don't expect the new version to make a difference. Unless someone can share a database to reproduce the problem, we can't really make any progress here.

@BWibo
Copy link

BWibo commented Feb 5, 2023

I can confirm this. The issue could be the same as in #366.

@BWibo
Copy link

BWibo commented Feb 5, 2023

I managed to reproduce the crash with the test database attached. It resembles the SSH key situation in my original database:

  • 1x RAS 4096
  • 3x ED25519 256
  • Database key transformations: 20144768

Version info:

Here is the test database: crash.zip
Password:

changeMe

@BWibo
Copy link

BWibo commented Mar 16, 2023

Any progress on this or anything else I can contribute to resolve this?

I'm using Windows Subsystem Linux 2 and the approach described here to use my SSH keys in WSL2. I am also runing Docker within the WSL2. Maybe this causes problems?

@attisan @shadow00: Are you using a similar setup?

A workaround that currently works for me is using KeepassCX with the native Windows 10 OpenSSH Agent.
I needed to upgrade Windows 10 OpenSSH Agent (v 8.1, see here) to get this running.

@attisan
Copy link
Author

attisan commented Mar 16, 2023

@BWibo my use case for this module regards accessing linux servers through winscp and vscode (remote extension).

After reading what @shadow00 wrote, I'm now have something of a workaround - as I start my computer and leave it to boot and to "settle in" while I fetch my coffee before logging into windows 🙄. this way I have a rather good success rate. so it seems really tide to the CPU usage.

@shadow00
Copy link

@BWibo I'm running an older version of Win10 and I use this in combination with Git Bash. No WSL.

But I'm pretty sure that the setup itself doesn't matter - I think it's an issue with the loading of the keys themselves.

Thanks for the suggestion to upgrade the windows openssh agent - sometimes I can't stop whatever I'm doing just to reduce the cpu load and get keeagent to start without crashing, so it would be nice to have KPXC as a backup for ssh too.

@dlech
Copy link
Owner

dlech commented Mar 25, 2023

I am not able to reproduce the issue. I tried using the database from #382 (comment) and I used CpuStres to try to reproduce the suspected high CPU condition. All keys loaded without crashing. Using KeePass 2.53.1 and KeeAgent 0.13.4 on Windows 11 22H2.

@dlech
Copy link
Owner

dlech commented Mar 25, 2023

I think I spoke too soon. After some more tries, I am able to get a crash.

@dlech
Copy link
Owner

dlech commented Mar 25, 2023

Closing as duplicate of #366 since I am getting the same stack trace as reported there.

@dlech dlech closed this as completed Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants