Repository Public
1{2 "id": "QYV-SVC-005",3 "title": "A backup whose records carry timestamps near 2^64 crashes the restoration after the vault was created",4 "severity": "low",5 "cvss_vector": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L",6 "cvss_score": 2.5,7 "cwe": "CWE-681",8 "masvs": "MASVS-CODE-4",9 "area": "storage",10 "location": "Sources/QyvoraVault/Vault.swift:46",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "ec01204",15 "regression_test": "QyvoraRecoveryTests.RecoveryAuditRegressionTests/vaultTimeNeverTraps, backupWithExtremeTimestampsIsWrittenReadAndRestoredWithoutTrap",16 "description": "Root cause: record times are stored as u64 seconds and read back as `Date`; `Vault.seconds` and `BackupFile.recordBody` converted them again with `UInt64(max(0, date.timeIntervalSince1970))`. A stored value above 2^64 - 1024 becomes the Double 2^64, which `UInt64(_:)` refuses with a trap. Impact: restoring a backup (file or device-to-device transfer) whose record `createdAt` is 0xFFFFFFFFFFFFFFFF terminated the process inside `Vault.addRecord`, after `Vault.create` had run, leaving an empty vault behind (cleared by `deleteWallet`). The file must authenticate under the password the user types, so the attacker has to supply both the backup and its password; a damaged authentic backup cannot produce the value.",17 "recommendation": "Fixed: `VaultTime.seconds` saturates (0 below 1970 or NaN, UInt64.max above the range) and is used by the vault and by the backup writer.",18 "evidence": "",19 "fingerprint": "8b7ddbf396ed",20 "reported": "2026-12-04",21 "owner": "review-b"22}23