Commit 4940a9c
fix(tbtc/signer): quarantine the full Round2 subset; reject phantom included IDs
Two findings:
P1 (quarantine bypass) - the Round2 gate recheck only quarantine-checked
this node's own member_identifier. The chosen signing subset (the
package's participants) is known at Round2, so this node could release a
share into a package that includes a quarantined co-signer, bypassing
the all-signing-participants quarantine the coarse path enforces. Round2
now computes the package's u16 subset (after verify confirms it is a
threshold-sized subset of the included set) and quarantine-checks ALL of
it before consuming the nonce. The Open gate keeps checking only this
member (the responsive subset is not chosen until Round2); the gate
helper now takes the identifier set to check so the two sites stay
aligned.
P2 (phantom participants) - Open validated the attempt context's
internal consistency but never checked that the included participants
are real DKG members. A caller could pad the included set with phantom
ids to bias the RFC-21 coordinator/attempt derivation, with Round2 then
releasing a share under an attempt context that is not a genuine DKG
subset. Open now rejects any included participant absent from the
session's dkg_key_packages.
Tests: a co-signer quarantined after round 1 blocks the Round2 share
without consuming the attempt (clearing it lets the attempt complete);
a phantom included id is rejected at Open even with a valid local
member. Full suite 266 passed / 1 ignored, clippy -D warnings clean,
chaos green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 289df95 commit 4940a9c
2 files changed
Lines changed: 197 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | | - | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
156 | 172 | | |
157 | 173 | | |
158 | 174 | | |
| |||
418 | 434 | | |
419 | 435 | | |
420 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
421 | 441 | | |
422 | 442 | | |
423 | | - | |
| 443 | + | |
424 | 444 | | |
425 | 445 | | |
426 | 446 | | |
| |||
450 | 470 | | |
451 | 471 | | |
452 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
453 | 487 | | |
454 | 488 | | |
455 | 489 | | |
| |||
690 | 724 | | |
691 | 725 | | |
692 | 726 | | |
693 | | - | |
694 | | - | |
695 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
696 | 737 | | |
697 | 738 | | |
698 | 739 | | |
699 | | - | |
| 740 | + | |
700 | 741 | | |
701 | 742 | | |
702 | 743 | | |
| |||
721 | 762 | | |
722 | 763 | | |
723 | 764 | | |
724 | | - | |
| 765 | + | |
725 | 766 | | |
726 | 767 | | |
727 | 768 | | |
| |||
737 | 778 | | |
738 | 779 | | |
739 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
740 | 805 | | |
741 | 806 | | |
742 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12612 | 12612 | | |
12613 | 12613 | | |
12614 | 12614 | | |
| 12615 | + | |
| 12616 | + | |
| 12617 | + | |
| 12618 | + | |
| 12619 | + | |
| 12620 | + | |
| 12621 | + | |
| 12622 | + | |
| 12623 | + | |
| 12624 | + | |
| 12625 | + | |
| 12626 | + | |
| 12627 | + | |
| 12628 | + | |
| 12629 | + | |
| 12630 | + | |
| 12631 | + | |
| 12632 | + | |
| 12633 | + | |
| 12634 | + | |
| 12635 | + | |
| 12636 | + | |
| 12637 | + | |
| 12638 | + | |
| 12639 | + | |
| 12640 | + | |
| 12641 | + | |
| 12642 | + | |
| 12643 | + | |
| 12644 | + | |
| 12645 | + | |
| 12646 | + | |
| 12647 | + | |
| 12648 | + | |
| 12649 | + | |
| 12650 | + | |
| 12651 | + | |
| 12652 | + | |
| 12653 | + | |
| 12654 | + | |
| 12655 | + | |
| 12656 | + | |
| 12657 | + | |
| 12658 | + | |
| 12659 | + | |
| 12660 | + | |
| 12661 | + | |
| 12662 | + | |
| 12663 | + | |
| 12664 | + | |
| 12665 | + | |
| 12666 | + | |
| 12667 | + | |
| 12668 | + | |
| 12669 | + | |
| 12670 | + | |
| 12671 | + | |
| 12672 | + | |
| 12673 | + | |
| 12674 | + | |
| 12675 | + | |
| 12676 | + | |
| 12677 | + | |
| 12678 | + | |
| 12679 | + | |
| 12680 | + | |
| 12681 | + | |
| 12682 | + | |
| 12683 | + | |
| 12684 | + | |
| 12685 | + | |
| 12686 | + | |
| 12687 | + | |
| 12688 | + | |
| 12689 | + | |
| 12690 | + | |
| 12691 | + | |
| 12692 | + | |
| 12693 | + | |
| 12694 | + | |
| 12695 | + | |
| 12696 | + | |
| 12697 | + | |
| 12698 | + | |
| 12699 | + | |
| 12700 | + | |
| 12701 | + | |
| 12702 | + | |
| 12703 | + | |
| 12704 | + | |
| 12705 | + | |
| 12706 | + | |
| 12707 | + | |
| 12708 | + | |
| 12709 | + | |
| 12710 | + | |
| 12711 | + | |
| 12712 | + | |
| 12713 | + | |
| 12714 | + | |
| 12715 | + | |
| 12716 | + | |
| 12717 | + | |
| 12718 | + | |
| 12719 | + | |
| 12720 | + | |
| 12721 | + | |
| 12722 | + | |
| 12723 | + | |
| 12724 | + | |
| 12725 | + | |
| 12726 | + | |
| 12727 | + | |
| 12728 | + | |
| 12729 | + | |
| 12730 | + | |
| 12731 | + | |
| 12732 | + | |
| 12733 | + | |
| 12734 | + | |
| 12735 | + | |
| 12736 | + | |
0 commit comments