Repository navigation
Remediate crypto-bigint timing advisory - #620
Merged
Pal Lakatos-Toth (pallakatos) merged 20 commits intoNov 12, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pal Lakatos-Toth (pallakatos)
requested review from
Johnson Shi (johnsonshi) and
Lachlan Evenson (lachie83)
as code owners
November 12, 2026 08:29
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF ScorecardScorecard details
Scanned Files
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pal Lakatos-Toth (pallakatos)
marked this pull request as draft
November 12, 2026 09:12
Add Kars-level positive and tampered-signature vectors for signer identity constraints. Keep the signed-OCI fixture limitation explicit: the vectors exercise the real constraint verifier but do not validate local OCI, Fulcio, or Rekor integration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise Kars policy verification against a local OCI Distribution API fixture with a test Fulcio chain, signed Rekor SET, and signed policy artifact. Cover issuer and SAN mismatch, artifact and signature tampering, and signed noncanonical bytes. Keep production trust and HTTPS defaults unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Delegate RSA verification to rsa 0.10 without reintroducing vulnerable crypto-bigint. Preserve the previous public-key size bounds and validate real legacy JWT fixtures against both providers. Keep independent security sign-off explicitly pending. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize public integers before constructing RSA keys and reject values beyond the prior verifier's checked bounds before allocating arithmetic precision. Preserve accepted leading-zero encodings while preventing padding-driven allocation amplification. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass the same first 32 public-key bytes used by the former verifier to AWS-LC for legacy oversized Ed25519 encodings. Retain normal signature rejection and fail closed for short keys; cover actual OAuth tokens and differential provider vectors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bind legacy Rekor certificates to the exact accepted signer key and identity without refetching the mutable .sig tag. Keep invalid candidates isolated, support Rekor rekord and hashedrekord digest variants, and extend signed-OCI coverage and audit evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 12, 2026
Reject signature layers whose signed manifest digest differs from the policy's pinned OCI digest, including when Sigstore triangulates via a cross-algorithm registry header. Add an end-to-end malicious registry regression and retain valid-candidate behavior.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Return the readiness condition directly to satisfy strict Clippy without changing the boolean behavior.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record pallakatos's explicitly authorized independent sign-off for the JWT and signed-OCI changes. Preserve audit findings and leave the gate unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pal Lakatos-Toth (pallakatos)
marked this pull request as ready for review
November 12, 2026 22:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rsa0.10 public APIs while AWS-LC handles other algorithms. The compatibility adapter preserves tested legacy RSA handling and bounds, without unpublished upstream pins, private RSA operations, custom math, or failure-triggered fallback.hashedrekordaccepts SHA-256/384/512, has nosignature.formatrequirement, and compares decoded digest bytes;rekordSHA-256 requiresformat: x509. SET-signed fixtures cover P-256/SHA-256, P-384/SHA-384, P-521/SHA-512, uppercase hashes, absent hashedrekord format, and binding failures. Kars no longer refetches the mutable.sigtag or clones registry-controlled layer payloads while evaluating candidates.Docker-Content-Digestfrom HEAD to select a legacy signature tag even when the policy is pinned by SHA-256. The regression uses a local registry that advertises the SHA-384 digest of a different, legitimately signed manifest for the pinned SHA-256 HEAD request, serves that manifest's legacy signature, then returns the pinned policy on GET; Kars rejects the signature/pin mismatch. A mismatched candidate does not prevent another correctly bound candidate from succeeding.publicKey.contentaccepts one or up to ten concatenatedCERTIFICATEPEM blocks. Kars parses every block and binds the first (leaf) certificate to the Sigstore-validated identity, key, and artifact signature; appended certificates do not extend trust. Tests cover a valid leaf-plus-root chain, mismatched leaf, malformed appended certificate, over-limit chain, and preservation of valid-candidate behavior when another legacy candidate has a malformed chain.LoadVerifier, which dispatches RSA to PKCS#1 v1.5; PSS requires explicit configuration and the legacy object has no algorithm marker. Kars follows that upstream default rather than guessing an alternate scheme. This does not claim that the Cosign wire specification forbids PSS.Related Issues
Relates to #594
Type of Change
Checklist
make test)make lint)Testing
50aefe35a654aa90624d0ac8bbf0d9e437e28a6b(audit-record-only change). All 40 reported PR checks are successful, including the unchangedsecurity-audit-requiredcheck. CI run 43308787519, attempt 2 succeeded, including Rust build/release nextest, Kind E2E (98 passed, 0 failed), Chaos, Criterion benchmark regression, and Mesh Plugin tests.BASE_REF=origin/main bash ci/security-audit-required.shandgit diff --checkalso passed locally. The first attempt had one E2E InferencePolicy status-read failure (97 passed, 1 failed): three separate status reads observed an empty phase, while the immediate diagnostic dump already showed the accepted Compiled/False/NoSandboxesReferencing state. The unchanged-head rerun passed that assertion and all 98 E2E checks. This is evidence of a transient status-initialization/read race, not a harness race fix or proof that it cannot recur. No production code, audit gate, or branch changes were made for the rerun.2559e384cc66f1499fb990fd2e9b781ea90846b9. CI run 43286314448 passed Rust format/Clippy/release build/nextest, Mesh Plugin Build & Test, Kind E2E, Chaos, Criterion benchmark regression, security scans, RustSec audit, cargo-deny, and other checks. Its audit gate failed before the newly recorded explicit maintainer sign-off; that historical red result is not a current-head result.cargo test -p kars-controller overlay_status_matchespassed 5/5;cargo clippy -p kars-controller --all-targets -- -D warnings,cargo fmt --all -- --check, andgit diff --checkpassed. The cross-algorithm digest regression was run as a negative control with the digest-binding guard removed in an isolated worktree: it failed at the assertion that a signature for a different manifest must be rejected, demonstrating that the malicious registry response was accepted without the fix. With the guard present,cargo test -p kars-controller signed_oci_passed all 3 tests: legacy signed-policy verification (including digest-mismatch rejection), OCI-referrer bundle verification, and valid-candidate behavior when another candidate is invalid. The failure in the negative-control run is expected; the fixed-head run passes.c47251ce14e1a0777caaf94c779a9c94404eab39also succeeded: CI run 43219710296, including 2,241 release nextest tests, 98/0 Kind E2E, chaos, and controller/router benchmark comparisons. It predates the digest-binding and overlay-readiness changes.2bd1d793(router code unchanged since):cargo test --locked --offline --package kars-inference-routerpassed 1,157 tests with 3 doc examples ignored; strict Clippy and the OAuth compatibility/preinstalled-provider suites passed. A prior exact-provider Rust 1.88 probe verified 28 RSA and 4 ECDSA vectors; this is not a full-workspace MSRV claim. The baseline workspace has dependencies requiring Rust 1.89, so full-workspace Rust 1.88 compatibility remains unverified.acbb63f021f47c1f90b02115411458bc0f32ec34against pinned C2SP Wycheproof vectors at commita3d5d1423f2592d6646836a45a21a1b209da9f4d. For Ed25519 (ed25519_test.json, Git blob3f991dd56496129e3a99b6b486408ef8f3df6945), the 210 vectors comprise 117valid, 29acceptable(21MixedOrderPublicKey, 8SmallOrderPublicKey), and 64invalid. Reported comparison: old and proposed providers accepted all 117 valid and 21 mixed-order cases and rejected all 64 invalid cases; the only 8 differences were acceptable small-order keys (old accepted, proposed rejected). The same reported probe compared P1363 ES256 (ecdsa_secp256r1_sha256_p1363_test.json, blobd5c41c1d498a69f81e9ddf49bc217217e1ccc2b8; 262 vectors) and ES384 (ecdsa_secp384r1_sha384_p1363_test.json, blobbe2d9c2856075274ce58b795a917304c706f79fb; 280 vectors): both providers accepted all 173 ES256 and 193 ES384validcases and rejected all 89 ES256 and 87 ES384invalidcases. The new session-only RSA provider-factory probe used JWK modulus/exponent inputs with six pinned files from the same commit: PKCS#1 v1.5 SHA-256/384/512 and PSS SHA-256/384/512 (Git blobs26f8d2c5b5c50bcba47653ee54d7b81e97f2ea0a,4f46227342d74e456ddb91fb0f0ff99f4dfecbc1,83f0083b48ad67a5faee5e2d68ac534496a2210f,bdb7694c4b44e8f0a3569bc2a9c56c33e9d24cec,2626470be2712e92e001fa3cf21695e48b1ca78e,7c6b44626473f71f6ac94694a9edc3d253976b93). Across 1,204 RSA vectors, both providers accepted all 314validcases and rejected all 887invalidplus all 3acceptablecases. Pinned file hashes and corpus counts were independently verified against public files. These are provider-factory-only, session-only differential results—not CI coverage, a full OAuth-stack test, exhaustive compatibility proof, or independent reviewer sign-off. The small-order Ed25519 rejection is deliberate hardening.cargo tree --locked -i crypto-bigint@0.5.5found no matching package; the updated RSA and P-256/P-384 paths resolve through crypto-bigint 0.7.11. Current-head RustSec audit and cargo-deny checks passed. Existing documented advisory exceptions remain; zero reported vulnerabilities means zero non-ignored findings.c47251ceused the actual Kars verifier, public Sigstore trust root, and anonymous GHCR: Kubewarden v1.29.0-rc1 legacy, v1.30.0-rc1 referrer, and v1.31.0-rc1 legacy and referrer signatures individually passed; wrong signer identities were rejected. A separate parser-boundary probe accepted 1, 2, and 10 certificate blocks and rejected 11; this was block-count parsing, not a 10-certificate chain-validity claim. Neither probe was a full Kars policy pull or a live Fulcio/Rekor transaction. Another session-only probe against pinned-digest anonymous public Quayargoproj/argocd@sha256:a87457ade255ec5d58857c8881398a07dede7700e6c4f44b7c27b2ea68562306(v3.0.0) and Chainguardcgr.dev/chainguard/static@sha256:fc42af33e643f20d08baf03cddcc1c02ba57052dfb02edb0d79f3fc47bcea8d9used the exact-head Kars trust root, Sigstore client, andverify_signer_identity; both GitHub Actions signer identities with issuerhttps://token.actions.githubusercontent.compassed and wrong signer identity was rejected.cosign verifyindependently verified public tag signatures for discovery. The Kars session-only pinned-digest test passed 1/1; this is not a full policy pull, private ACR test, or reviewer sign-off. A separate authentication-only session probe linked cached Sigstore 0.14 and 0.15 clients to fetch the Kubewarden v1.29.0-rc1 legacy signature layer from GHCR using a scoped anonymous-public-repository bearer token; both clients rejected an invalid bearer. This only exercises the Sigstore clients' bearer registry path, not Kars IMDS/ACR token acquisition, private ACR, signature validation, or a full policy pull.125a53588e3ea256c5a9ab270336b4d0635e5853plus crypto headc47251ce14e1a0777caaf94c779a9c94404eab39,git merge-treereports one controller dependency-list conflict inCargo.lock; the isolated resolution retains bothx509-certandyaml_serde. Locked/offline metadata containscrypto-bigint 0.7.11and no0.5.5. WithCARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0 CARGO_BUILD_JOBS=2, 45 targeted tests passed (9 controller YAML, 3 signed OCI, 21 conformance, 10 OAuth compatibility, 1 preinstalled-provider, 1 governance numeric-policy regression). Pairwise virtual merges with Headlamp headc9fe3f82are clean. This is targeted, isolated candidate-integration evidence only—not an actual merge, exhaustive compatibility evidence, or independent audit sign-off.make test-e2ewas unavailable because the Docker daemon is not running; the exact-head remote Kind E2E, chaos, and benchmark workflows above passed.make testandmake lintwere not run; their checklist boxes remain unchecked.