keepassxreboot / keepassxc

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

[2.5.1] Crash when clicking different tab while database is decrypting #3887

Closed MartinX3 closed 4 years ago

MartinX3 commented 4 years ago

Expected Behavior

It unlocks my database and opens the tab of the locked database.

Current Behavior

The application crash with a segfault.

Possible Solution


Steps to Reproduce

  1. Open 2 password files
  2. Enter the password in the second tab
  3. At the same time you execute the unlocking, click on the first tab

Context

I have 2 password files open at the same time.

Debug Info

KeePassXC - Version 2.5.1 Revision: 0fd8836

Qt 5.9.5 Diagnosemodus ist deaktiviert.

Betriebssystem: Linux Mint 19.2 CPU-Architektur: x86_64 Kernel: linux 5.0.0-36-generic

Aktivierte Erweiterungen:

Kryptographische Bibliotheken: libgcrypt 1.8.1

ba32107 commented 4 years ago

We could solve this the same way as https://github.com/keepassxreboot/keepassxc/pull/3885, but I don't think that's the right approach.

I've narrowed down the problem to this method: https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/FileWatcher.cpp#L137 The crash happens when the future completes (if the DB tab is switched). Not really sure yet why.

Oldbot70 commented 4 years ago

I'm running 2.5.1 on Linux rogue 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux And am getting a 'Segmentation fault' after performing a couple of operations if that helps your diagnosis at all. This morning I created a new entry and saved it. Brought it up to edit the entry. Saved it. On the next attempt it crashed when I did the OK.

XanatosX commented 4 years ago

The same problem happens on Windows 10. If you unlock the database and select another window such as the browser while the unlocking is still in progress KeepassXC is crashing

KeePassXC - Version 2.5.1 Revision: 0fd8836

Qt 5.13.1 Diagnosemodus ist deaktiviert.

Betriebssystem: Windows 10 (10.0) CPU-Architektur: x86_64 Kernel: winnt 10.0.18362

Aktivierte Erweiterungen:

Kryptographische Bibliotheken: libgcrypt 1.8.5

droidmonkey commented 4 years ago

Can no longer replicate this on the 2.5.2 branch.