Skip to content

Commit 3739924

Browse files
committed
plan: mark 2.3 done (fail-loud key + backup writes); tick T4
1 parent 1bfbf71 commit 3739924

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

plan/pending/hardening.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ These undermine the flagship "portable, offline-verifiable proof" and "attributa
9090
guarantees directly.
9191

9292
**Status: partial.** 2.1 (reject empty signatures) and 2.2 (0600 key file) are DONE, along with
93-
2.x below (an upper-bound linkage soundness bug found while fixing 2.1); the key-write path of 2.3
94-
is done. 2.3's backup path, 2.4 (wider NodeId), 2.5, and 2.6 remain. Full suite + acceptance green.
93+
2.x below (an upper-bound linkage soundness bug found while fixing 2.1); 2.3 (fail-loud key + backup writes)
94+
is done. 2.4 (wider NodeId), 2.5, and 2.6 remain. Full suite + acceptance green.
9595

9696
- [x] **2.1 — Reject unsigned/empty signatures in validation.** `Ed25519KeyStore::verify` returns
9797
`true` for an empty signature ([keystore.cpp:84](../../src/adapters/os/keystore.cpp#L84)), and
@@ -117,8 +117,10 @@ is done. 2.3's backup path, 2.4 (wider NodeId), 2.5, and 2.6 remain. Full suite
117117
upper bound disconnected from the event still validated — it did not actually enclose the event.
118118
Every upper element (the first must reference the event) is now checked. Honest chains are
119119
unaffected (upper-front always references the event by construction); regression test added.
120-
- [ ] **2.3 — Fail loudly on key/backup write errors.** *Key path DONE with 2.2 (every write/rename
121-
checked, throws on failure); the backup path below is still open.* `keystore.cpp`'s key write and
120+
- [x] **2.3 — Fail loudly on key/backup write errors.** *DONE — key path with 2.2, backup path here:
121+
`FileStore::save` now checks open/write/close/rename and throws on failure, composing with the
122+
Phase 1.5 `dispatch_guarded` so `db-backup` returns `ERR` (verified end to end) instead of a false
123+
success.* `keystore.cpp`'s key write and
122124
`FileStore::save` ([adapters/os/store.hpp](../../src/adapters/os/store.hpp) `save`) ignore
123125
`ofstream`/`rename` failures and return `void`; `db-backup` then reports **success
124126
unconditionally**. Check every write/rename; propagate failure; make `db-backup` reply `ERR`
@@ -316,7 +318,7 @@ pruning, and uses a lossless transport. Add:
316318
- [x] **T2 — Byzantine `ChainResponse`** (bad hash/linkage/endpoint) → discovery aborts, node
317319
survives (Phase 1.4).
318320
- [x] **T3 — forged all-unsigned proof**`verify` rejects (Phase 2.1).
319-
- [~] **T4 — key-file mode `0600`** (done) and **backup-write-failure → ERR** (pending) (Phase 2.2/2.3).
321+
- [x] **T4 — key-file mode `0600`** (done) and **backup-write-failure → ERR** (done) (Phase 2.2/2.3).
320322
- [ ] **T5 — huge-count decode** rejected without large allocation (Phase 3.1).
321323
- [x] **T6 — spoofed-source / duplicate notification** dropped (transport source check, 3.2) /
322324
deduped (3.3).

0 commit comments

Comments
 (0)