fix: verify all adjacent certificate chain links in browser MDA validation#130
fix: verify all adjacent certificate chain links in browser MDA validation#130antojoseph wants to merge 2 commits into
Conversation
…ation Previously only verified leaf→certs[1] and topCert→AppleRoot, leaving intermediate links unchecked. A crafted chain [forged_leaf, attacker_CA, Apple_root] would pass both checks without attacker_CA being signed by Apple root. Now iterates all adjacent pairs before accepting the chain.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hankbobtheresearchoor
left a comment
There was a problem hiding this comment.
LGTM. This closes the browser-side MDA chain gap by checking each adjacent certificate signature before the Apple root check.
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
Benchmark ResultsRunner: 1-provider-streaming1 providers, 1 users, 30 requests, concurrency=5, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-non-streaming1 providers, 1 users, 20 requests, concurrency=5, streaming=false
Latency Decomposition
Assertion Report: PASS
7-provider-multi-model7 providers, 5 users, 50 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-high-concurrency3 providers, 10 users, 60 requests, concurrency=20, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-queue-saturation1 providers, 10 users, 40 requests, concurrency=15, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-20-users3 providers, 20 users, 60 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-scaling1 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-scaling3 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
5-provider-scaling5 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-heavy-100conc-10kb3 providers, 20 users, 100 requests, concurrency=100, streaming=true
Latency Decomposition
Assertion Report: FAIL
|
Summary
console-ui/src/lib/cert-verify.ts: step 3 now iterates all adjacent pairscerts[i].verify(certs[i+1])instead of only checkingleaf → certs[1]Security impact
The previous code only verified that the leaf was signed by
certs[1], and separately that the topmost cert was signed by Apple's root. A crafted chain like[forged_leaf, attacker_CA, Apple_root]— whereforged_leafis signed byattacker_CAandattacker_CAis self-signed — would pass both checks withoutattacker_CAbeing validated againstApple_root. The fix closes this gap by verifying every link in the chain before accepting it.This is a client-side verification displayed in the UI's "Verify Device" panel, so exploitation requires serving a forged cert chain to a user who clicks "Verify."
Test plan
npx tsc --noEmit— no new type errors in cert-verify.ts