Skip to content

fix: reject WebAuthn requests that need a security key PIN instead of crashing - #54355

Merged
MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-n4nmge
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-n4nmge

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

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 AuthTokenRequester fall back to collecting the key's PIN even though our delegate reports SupportsPIN() == false. We inherited content's default CollectPIN(), which is NOTREACHED(), 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 sees NotAllowedError) and logs a console warning pointing at WebAuthn FIDO/FIDO2 Support #24573.
  • Testing builds get simulateWebAuthnUvLockedPinSecurityKey() on the testing binding, which injects a virtual CTAP 2.1 key in that state via CreatePlatformDiscoveries(); DevTools virtual authenticators can't be given a PIN.
  • New spec covers create() and get(); without the fix it reproduces the NOTREACHED with the same FIDO log sequence as the issue.

Checklist

Release Notes

Notes: Fixed a crash when a WebAuthn request used a security key that required its PIN.

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@MarshallOfSound MarshallOfSound self-assigned this Sep 25, 2026
@MarshallOfSound
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
MarshallOfSound force-pushed the claude/project-thread-n4nmge branch from 7f3fd93 to db10509 Compare September 25, 2026 10:32
@MarshallOfSound
MarshallOfSound merged commit 417f2e4 into main Sep 25, 2026
74 checks passed
@MarshallOfSound
MarshallOfSound deleted the claude/project-thread-n4nmge branch September 25, 2026 12:04
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a crash when a WebAuthn request used a security key that required its PIN.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "44-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed the target/44-x-y PR should also be added to the "44-x-y" branch. label Sep 25, 2026
@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "43-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54371

@trop trop Bot added in-flight/45-x-y and removed target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@trop trop Bot added merged/45-x-y PR was merged to the "45-x-y" branch. and removed in-flight/45-x-y labels Sep 25, 2026
@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@MarshallOfSound has manually backported this PR to "44-x-y", please check out #54403

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
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]>
@trop trop Bot removed the in-flight/43-x-y label Sep 25, 2026
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]>
@trop trop Bot added merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed in-flight/44-x-y labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

WebAuthn request that needs a security-key PIN crashes the browser process on Linux

2 participants