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

All FIDO2 credentials gone #1233

Open
nekromant opened this issue Jul 28, 2024 · 8 comments
Open

All FIDO2 credentials gone #1233

nekromant opened this issue Jul 28, 2024 · 8 comments
Assignees

Comments

@nekromant
Copy link
Contributor

nekromant commented Jul 28, 2024

Expected behavior

No added FIDO2 credentials vanish from the database, unless explicitly deleted

Actual behavior

After a day or two migrating to mooltipass and adding credentials, FIDO2 and credentials tab went empty. Credentials were brought back via running an integrity check, but not FIDO2. I had to manually reset keys and re-add them for all accounts.

Step by step guide to reproduce the problem

Add data for vk social network. It uses vk.com, vk.ru, vkontakte.com, id.vk.ru and id.vk.com domains at the same time weirdly redirecting duing login. Link credentials for id.vk[.com,.ru] and vkontakte.com, add the FIDO2 key. At some moment you'll add up with a broken database.

WARNING: (2024-07-28T17:08:45.770) :0 - Orphan child found: "+XXXXXXXXX" at address: "6c02"
DEBUG: (2024-07-28T17:08:45.770) :0 - Number of parent orphans: 0
DEBUG: (2024-07-28T17:08:45.770) :0 - Number of children orphans: 1
DEBUG: (2024-07-28T17:08:45.770) :0 - Number of data parent orphans: 0
DEBUG: (2024-07-28T17:08:45.770) :0 - Number of data children orphans: 0
INFO: (2024-07-28T17:08:45.770) :0 - Errors were found in the database
CRITICAL: (2024-07-28T17:08:45.770) :0 - Error in our local DB (algo PB?)

Moolticute Version

1.04.0 / 1.03.0

Operating System

Mention if you are using either:

  • Debian Stable

Mooltipass Device

  • The Mooltipass Mini BLE
@deXol
Copy link
Collaborator

deXol commented Jul 30, 2024

@nekromant: I was trying to reproduce the issue based on step by step, but unfortunately I am unable to do that.
Can you reproduce the issue? If yes, can you please attach the log when you are first encountering the issue. (During entering/exiting MMM)
Based on that I would like to investigate what can trigger this problem.

@nekromant
Copy link
Contributor Author

nekromant commented Jul 30, 2024

Got it. Should wiping a profile clean and starting with a new spare smartcard be enough to reset thre device's state?

@limpkin
Copy link
Collaborator

limpkin commented Jul 30, 2024

a blank card will be enough to initialize a new profile :)

@nekromant
Copy link
Contributor Author

nekromant commented Jan 13, 2025

A little update: I couldn't reproduce the issue, but then out of a sudden I stumbled upon it again. Now with notes. Device originally contained only 2 notes: '2fa-backup' and TODO.

Screenshot_20250113_221422

I can access data in 2fa-backup, but not in todo which gives me:

Screenshot_20250113_221523

Here are the relevant pieces from the log:

EBUG: (2025-01-13T22:11:07.633) ../moolticute/src/WSClient.cpp:156 - New message:  {"data":{"note":"2fa-backup","note_data":"XXXXXXXXXXXXXXXXXXXXXXX"},"msg":"get_note_node"}
DEBUG: (2025-01-13T22:11:13.410) ../moolticute/src/WSClient.cpp:156 - New message:  {"data":{"note":"2fa-backup","note_data":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"},"msg":"get_note_node"}
DEBUG: (2025-01-13T22:11:16.042) ../moolticute/src/WSClient.cpp:156 - New message:  {"data":{"error_message":"reading data failed or no data","failed":true},"msg":"get_note_node"}
DEBUG: (2025-01-13T22:11:17.765) ../moolticute/src/WSClient.cpp:156 - New message:  {"data":{"error_message":"reading data failed or no data","failed":true},"msg":"get_note_node"}
DEBUG: (2025-01-13T22:15:18.236) ../moolticute/src/WSClient.cpp:156 - New message:  {"data":{"error_message":"reading data failed or no data","failed":true},"msg":"get_note_node"}

There's definitely mysterious data corruption happening, but it's gonna be a very hard catch if it's happening once in a few months.

@limpkin
Copy link
Collaborator

limpkin commented Jan 13, 2025

that's baffling, especially given we have several algorithms that check for data corruption before writing anything to the DB. can you maybe tell us how you typically use the mini ble? I'm trying to find events that could create this situation.
did you import/export a DB from another unit?

@nekromant
Copy link
Contributor Author

nekromant commented Jan 14, 2025

I keep 3 devices (1 original, 2 diy clones) in sync via nextcloud using moolticute, so import/export happens very often. I use USB connection all the time, no bluetooth.

I currently have 2 hypothesis:

  1. Something battery related. When I first started using mooltipass (I had only one original unit at that time), the unit I got had a nearly dead battery.
  2. A race condition between cloud sync and moolticute. E.g. the backup file gets updated as it is being restored to device.

I have yet to dive into moolticute code to see if guess #2 is possible. Meanwhile, I keep an eye on any other possible issues with the database.

P.S. We DO need a plaintext backup for the whole device database. If not for debugging - at least for the sake of fast batch import of passwords during onboarding.

@limpkin
Copy link
Collaborator

limpkin commented Jan 15, 2025

just to make sure we're aligned: what you may be seeing is when a database import occurs, files get duplicated and can't be accessed anymore?

@nekromant
Copy link
Contributor Author

I'm not 100% sure what caused that. At some point I noticed that the entries were duplicated (i don't access notes often). Import issue is just my guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants