Commit 797aa71
fix(tbtc/signer): bind the interactive completion marker to the message (re-review)
Codex re-review on the Round2 completion gate:
[P1] The gate trusted aggregated_interactive_attempt_markers keyed by attempt_id
alone, but interactive_aggregate never binds attempt_id to the aggregated package/
message - it only checks the shares aggregate under the session key. So a caller
with any valid aggregate could replay it under a DIFFERENT live attempt's id, set
that marker, and the new gate would then refuse the real Round2 before its nonce is
consumed (an availability/DoS regression the single-member engine never had).
Fix: make the completion marker MESSAGE-BOUND - interactive_aggregated_marker =
"{attempt_id}@{message_digest}". interactive_aggregate writes it from the package it
actually aggregated (all five marker sites: both completion pre-checks, the capacity
guard, the insert, and the persist-rollback). The Round2 gate recomputes it from the
message THIS member opened, so it preempts Round2 only for a genuine same-message
completion; a replayed aggregate carrying a different message sets an unrelated
marker that cannot match. Same-message re-aggregation is still rejected (existing
restart/repeat tests pass unchanged - they re-aggregate the same message).
[P2] On that genuine completion rejection, the unsigned sibling's entry is now dead,
so free it (zeroizing its nonces) instead of letting it hold a live-member cap slot
until the TTL sweep. Only the matching member's entry is removed.
Tests: the multi-seat refusal test now also asserts the marker is bound
(attempt_id@digest, not the bare id) and that the refused sibling's entry is freed.
All 294 lib tests pass; cargo fmt clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 2684dde commit 797aa71
2 files changed
Lines changed: 79 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
| |||
473 | 483 | | |
474 | 484 | | |
475 | 485 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
485 | 513 | | |
486 | 514 | | |
487 | 515 | | |
| |||
675 | 703 | | |
676 | 704 | | |
677 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
678 | 711 | | |
679 | 712 | | |
680 | 713 | | |
| |||
705 | 738 | | |
706 | 739 | | |
707 | 740 | | |
708 | | - | |
| 741 | + | |
709 | 742 | | |
710 | 743 | | |
711 | 744 | | |
| |||
816 | 849 | | |
817 | 850 | | |
818 | 851 | | |
819 | | - | |
| 852 | + | |
820 | 853 | | |
821 | 854 | | |
822 | 855 | | |
| |||
825 | 858 | | |
826 | 859 | | |
827 | 860 | | |
828 | | - | |
| 861 | + | |
829 | 862 | | |
830 | 863 | | |
831 | 864 | | |
832 | 865 | | |
833 | 866 | | |
834 | | - | |
| 867 | + | |
835 | 868 | | |
836 | 869 | | |
837 | 870 | | |
838 | 871 | | |
839 | 872 | | |
840 | 873 | | |
841 | 874 | | |
842 | | - | |
| 875 | + | |
843 | 876 | | |
844 | 877 | | |
845 | 878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11808 | 11808 | | |
11809 | 11809 | | |
11810 | 11810 | | |
| 11811 | + | |
| 11812 | + | |
| 11813 | + | |
| 11814 | + | |
| 11815 | + | |
| 11816 | + | |
| 11817 | + | |
| 11818 | + | |
| 11819 | + | |
| 11820 | + | |
| 11821 | + | |
| 11822 | + | |
| 11823 | + | |
| 11824 | + | |
| 11825 | + | |
| 11826 | + | |
| 11827 | + | |
| 11828 | + | |
| 11829 | + | |
| 11830 | + | |
| 11831 | + | |
11811 | 11832 | | |
11812 | 11833 | | |
11813 | 11834 | | |
| |||
11838 | 11859 | | |
11839 | 11860 | | |
11840 | 11861 | | |
| 11862 | + | |
| 11863 | + | |
| 11864 | + | |
| 11865 | + | |
| 11866 | + | |
| 11867 | + | |
| 11868 | + | |
| 11869 | + | |
| 11870 | + | |
| 11871 | + | |
| 11872 | + | |
11841 | 11873 | | |
11842 | 11874 | | |
11843 | 11875 | | |
| |||
0 commit comments