Warning: KeePassXC 2.8.0 may delete the database on SMB/CIFS shares

Started by minixjr, Yesterday at 15:10:32

Previous topic - Next topic

minixjr

Mit dem Update auf KeePassXC 2.8.0 (Qt 6) habe ich heute meine Datenbank verloren. Sie lag auf einer per CIFS eingehängten SMB-Freigabe, bei mir das NAS einer FRITZ!Box 7690.

Betroffen sind Datenbanken auf Freigaben ohne Hardlink-Unterstützung, wenn in den Einstellungen unter Allgemein → Dateiverwaltung ,,Alternative Speichermethode verwenden" mit ,,Temporärdatei verschoben" ausgewählt ist. Das Problem tritt sofort auf: Beim ersten Entsperren nach dem Update gilt die Datenbank als geändert und wird automatisch gespeichert.

Was passiert: KeePassXC löscht zuerst das Original und will dann die neue Datei aus /tmp auf die Freigabe verschieben. Mit Qt 6 scheitert das (,,Die Operation wird nicht unterstützt"). Danach existiert die Datenbank nur noch als /tmp/KeePassXC.XXXXXX. Das liegt auf tmpfs und ist nach einem Neustart weg.

Abhilfe:
- Vor dem ersten Entsperren die Speichermethode auf ,,Datei direkt überschreiben" stellen. Das funktioniert auf der Freigabe.
- ,,Vor dem Speichern Backup der Datenbank erstellen" mit einem lokalen Pfad einschalten.
- Wer schon betroffen ist: sofort
/tmp/KeePassXC.* an einen sicheren Ort kopieren und nicht neu starten. Oder die Datenbank aus dem Backup zurückholen.

Fehlerbericht mit Analyse: https://github.com/keepassxreboot/keepassxc/issues/13970


After updating to KeePassXC 2.8.0 (Qt 6), I lost my database today. It was stored on an SMB share mounted via CIFS, in my case the NAS of a FRITZ!Box 7690.

Affected: databases on shares without hard-link support, when Settings → General → File Management has "Use alternative saving method" set to "Temporary file moved". The problem shows up immediately: the first unlock after the update marks the database as modified, and it is saved automatically.

What happens: KeePassXC deletes the original first and then tries to move the new file from /tmp to the share. With Qt 6 this fails ("Operation not supported"). Afterwards the database only exists as /tmp/KeePassXC.XXXXXX. That is on tmpfs and is gone after a reboot.

Workaround:
- Before unlocking for the first time, switch the save method to "Overwrite file directly". This works on the share.
- Enable "Backup database file before saving" with a local path.
- If you are already affected: copy
/tmp/KeePassXC.* to a safe place right away and don't reboot. Or restore the database from the backup.

Bug report with analysis: https://github.com/keepassxreboot/keepassxc/issues/13970
---
Gemeinsam mit Claude Code (Opus 5.5) erarbeitet. / Worked out together with Claude Code (Opus 5.5).
 
Frame-accurate video editing for MPEG-2, H.264 and H.265 elementary streams: TTCut-ng

minixjr

Nachtrag: Passkeys aus älteren Versionen

Ein zweites Problem nach dem Update von 2.7.10 auf 2.8.0: Anmeldungen mit Passkeys, die mit einer älteren KeePassXC-Version angelegt wurden, können scheitern. Bei mir betraf es die Systemseite meines QNAP-NAS. KeePassXC zeigt den Dialog, nach ,,Authentifizieren" meldet die Seite nur ,,Etwas ist schief gelaufen".

Ursache: Seit 2.7.12 setzt KeePassXC die WebAuthn-Flags BE (Backup Eligible) und BS (Backup State) auf true. Ältere Passkeys wurden mit BE = false registriert. Laut WebAuthn darf sich das Flag nicht ändern, deshalb lehnen strenge Server die Anmeldung ab. Wer wie ich von 2.7.10 direkt auf 2.8.0 aktualisiert, bekommt die Änderung zum ersten Mal mit.

Abhilfe (von den KeePassXC-Entwicklern, https://github.com/keepassxreboot/keepassxc/issues/13239): Eintrag bearbeiten → Erweitert → Zusätzliche Attribute, zwei Attribute hinzufügen:
KPEX_PASSKEY_FLAG_BE = 0
KPEX_PASSKEY_FLAG_BS = 0
Alternativ beim Dienst einen neuen Passkey registrieren.

Addendum: passkeys created with older versions

A second issue after updating from 2.7.10 to 2.8.0: logins with passkeys created by an older KeePassXC version may fail. In my case it was the admin page of my QNAP NAS. KeePassXC shows the dialog, after "Authenticate" the page only says "Something went wrong".

Cause: Since 2.7.12, KeePassXC sets the WebAuthn flags BE (Backup Eligible) and BS (Backup State) to true. Older passkeys were registered with BE = false. WebAuthn does not allow this flag to change, so strict servers reject the login. Anyone who, like me, updates from 2.7.10 straight to 2.8.0 runs into this change for the first time.

Workaround (from the KeePassXC developers, https://github.com/keepassxreboot/keepassxc/issues/13239): edit the entry → Advanced → Additional attributes, add two attributes:
KPEX_PASSKEY_FLAG_BE = 0
KPEX_PASSKEY_FLAG_BS = 0
Alternatively, register a new passkey with the service.

---
Gemeinsam mit Claude Code (Opus 5.5) erarbeitet. / Worked out together with Claude Code (Opus 5.5).
Frame-accurate video editing for MPEG-2, H.264 and H.265 elementary streams: TTCut-ng