Sync: a forged roster under your signup vault id isn't offered for leaving (#1001) #37

Open
backmeupplz wants to merge 3 commits from board/1001-df33fa into main
Owner

Fixes agentboard #1001 (follow-up from #998 / PR #26).

A server that serves a fresh device an old keyring (no roster checkpoint for the signup vault) could serve a valid chain signed by someone else (mallory) under the signup vault's id, listing you as a member. The vault then opened with creator == mallory, so Session::is_own said it wasn't yours and sync offered plaintext vault leave for it ("counts against your storage, though mallory created it").

  • is_own: the signup vault (keyring.default_vault) with a verified roster naming another creator counts as your own. We always sign its first roster, so that mismatch means tampering. A signup vault you created and were really demoted in (a signed demotion) still isn't, as before.
  • The paid loop checks is_own before the "though X created it" arm, so it says nothing about such a vault (your own vaults aren't named there).
  • Test in nobody_is_stuck_paying_for_a_vault, the only test with a storage quota (the "though X created it" arm needs one): bob's keyring names mallory's vault Big as his signup vault, which is what a forged chain under that id looks like to the client, and sync no longer names it or offers to leave it. It fails without the fix.

🤖 Generated with Claude Code

Fixes agentboard #1001 (follow-up from #998 / PR #26). A server that serves a fresh device an old keyring (no roster checkpoint for the signup vault) could serve a valid chain signed by someone else (mallory) under the signup vault's id, listing you as a member. The vault then opened with `creator == mallory`, so `Session::is_own` said it wasn't yours and sync offered `plaintext vault leave` for it ("counts against your storage, though mallory created it"). - `is_own`: the signup vault (`keyring.default_vault`) with a verified roster naming another creator counts as your own. We always sign its first roster, so that mismatch means tampering. A signup vault you created and were really demoted in (a signed demotion) still isn't, as before. - The `paid` loop checks `is_own` before the "though X created it" arm, so it says nothing about such a vault (your own vaults aren't named there). - Test in `nobody_is_stuck_paying_for_a_vault`, the only test with a storage quota (the "though X created it" arm needs one): bob's keyring names mallory's vault `Big` as his signup vault, which is what a forged chain under that id looks like to the client, and sync no longer names it or offers to leave it. It fails without the fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sync: a forged roster under your signup vault id isn't offered for leaving (#1001)
Some checks failed
Apple / Apple (pull_request) Successful in 33s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
97b48d4108
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
is_own: say in its doc comment when the signup vault counts
Some checks failed
Apple / Apple (pull_request) Successful in 38s
Android / android (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
CI / wasm (pull_request) Has been cancelled
4ed0aa5de2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into pr37
Some checks are pending
Apple / Apple (pull_request) Successful in 31s
Android / android (pull_request) Has started running
CI / wasm (pull_request) Successful in 3m56s
CI / check (pull_request) Successful in 7m42s
6204b706b5
Some checks are pending
Apple / Apple (pull_request) Successful in 31s
Android / android (pull_request) Has started running
CI / wasm (pull_request) Successful in 3m56s
CI / check (pull_request) Successful in 7m42s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'board/1001-df33fa:board/1001-df33fa'
git switch 'board/1001-df33fa'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
backmeupplz/plaintext!37
No description provided.