Repository navigation
fix: reject WebAuthn requests that need a security key PIN instead of crashing - #54355
Merged
Merged
Conversation
codebytere
approved these changes
Sep 25, 2026
MarshallOfSound
enabled auto-merge (squash)
September 25, 2026 09:57
… crashing A CTAP2 security key whose built-in user verification is locked (or gets blocked mid-request) makes Chromium fall back to collecting the key's PIN even though the embedder reports SupportsPIN() == false. Electron inherited content's default CollectPIN(), which is NOTREACHED(), so the browser process died. Cancel the request instead and log why to the console. Adds a testing-binding hook that injects a virtual CTAP 2.1 key in that state (DevTools virtual authenticators cannot have a PIN) and a spec that covers create() and get(). Fixes #54317
MarshallOfSound
force-pushed
the
claude/project-thread-n4nmge
branch
from
September 25, 2026 10:32
7f3fd93 to
db10509
Compare
4 tasks done
|
Release Notes Persisted
|
Contributor
|
I was unable to backport this PR to "44-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "43-x-y" cleanly; |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54371 |
3 tasks done
Contributor
|
@MarshallOfSound has manually backported this PR to "44-x-y", please check out #54403 |
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #54404 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 25, 2026
… crashing (43-x-y) (#54404) * fix: reject WebAuthn requests that need a security key PIN instead of crashing (#54355) A CTAP2 security key whose built-in user verification is locked (or gets blocked mid-request) makes Chromium fall back to collecting the key's PIN even though the embedder reports SupportsPIN() == false. Electron inherited content's default CollectPIN(), which is NOTREACHED(), so the browser process died. Cancel the request instead and log why to the console. Adds a testing-binding hook that injects a virtual CTAP 2.1 key in that state (DevTools virtual authenticators cannot have a PIN) and a spec that covers create() and get(). Fixes #54317 (cherry picked from commit 417f2e4) * test: wait for the WebAuthn PIN warning instead of sampling console messages (#54377) (cherry picked from commit 7489ee0) --------- Co-authored-by: Shelley Vohr <[email protected]>
MarshallOfSound
added a commit
that referenced
this pull request
Sep 25, 2026
… crashing (44-x-y) (#54403) * fix: reject WebAuthn requests that need a security key PIN instead of crashing (#54355) A CTAP2 security key whose built-in user verification is locked (or gets blocked mid-request) makes Chromium fall back to collecting the key's PIN even though the embedder reports SupportsPIN() == false. Electron inherited content's default CollectPIN(), which is NOTREACHED(), so the browser process died. Cancel the request instead and log why to the console. Adds a testing-binding hook that injects a virtual CTAP 2.1 key in that state (DevTools virtual authenticators cannot have a PIN) and a spec that covers create() and get(). Fixes #54317 (cherry picked from commit 417f2e4) * test: wait for the WebAuthn PIN warning instead of sampling console messages (#54377) (cherry picked from commit 7489ee0) --------- Co-authored-by: Shelley Vohr <[email protected]>
6 of 7 tasks
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.
Description of Change
Fixes #54317.
A CTAP2 security key whose built-in user verification is locked (zero UV retries, or UV gets blocked mid-request) makes Chromium's
AuthTokenRequesterfall back to collecting the key's PIN even though our delegate reportsSupportsPIN() == false. We inherited content's defaultCollectPIN(), which isNOTREACHED(), so the browser process died right after the PIN-retries read, matching the reporter's FIDO log ({5: 0}then{3: 8}).ElectronAuthenticatorRequestClientDelegate::CollectPIN()now cancels the request (page seesNotAllowedError) and logs a console warning pointing at WebAuthn FIDO/FIDO2 Support #24573.simulateWebAuthnUvLockedPinSecurityKey()on the testing binding, which injects a virtual CTAP 2.1 key in that state viaCreatePlatformDiscoveries(); DevTools virtual authenticators can't be given a PIN.create()andget(); without the fix it reproduces theNOTREACHEDwith the same FIDO log sequence as the issue.Checklist
npm testpassesRelease Notes
Notes: Fixed a crash when a WebAuthn request used a security key that required its PIN.