Skip to content

Guard decoder lengths and nullable input fields - #12

Open
mswilkison wants to merge 1 commit into
devfrom
codex/input-guards
Open

mswilkison wants to merge 1 commit into
devfrom
codex/input-guards

Conversation

@mswilkison

Copy link
Copy Markdown

Validate decoder lengths and nullable helper inputs before indexed reads, coordinate allocation, or dereferencing. Require a commitment payload and propagate nil signing point results through existing error paths. Valid encodings, optional proof serialization, nil-key parameter skips, and existing API signatures are preserved.

Source-level backports of the public upstream input-validation changes; the individual upstream commits are recorded in the commit message.

Validation: bounded input and roundtrip tests plus the complete tss, crypto, crypto/commitments, crypto/mta, and ecdsa/signing package suites passed with GOMAXPROCS=2 and go test -p 1. Formatting, diff checks, and independent patch review passed.

Validate helper inputs before indexed reads and coordinate-buffer allocation,
require a commitment payload, and propagate nil signing point results through
the existing error paths. Preserve base proof arities, optional-mode proof
serialization, nil-key parameter skips, and valid routing and point encodings.

Adapted from upstream commits:
f1588ae (WC decoder arity)
8deab46 (sender metadata guards)
1a8e277 (embedded PartyID guards)
8069c6c (SortedPartyIDs.Keys guard)
6e0bcd4 (shared nullable-input guards)
58a131c (commitment minimum parts)
cbb8fe4 (commitment boundary coverage)
e65fb36 (Gob coordinate allocation bounds)
8acae9a (signing nil-result guards)
1693884 (PartyID.String content guard)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant