mozilla / mozilla/authenticator-rs

Unexpected keys in CTAP2 responses should be ignored

Open
#343 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
316
Forks
82
Avg merge
4d 20h
Merged PRs (30d)
1

Description

Hello,

I'm working on a FIDO2 hardware token that supports the CTAP2.1 protocol, and we have identified an issue with Mozilla Firefox on Linux. Specifically, when the authenticatorGetAssertion command's response contains keys introduced in CTAP2.1, the entire response is rejected. This behavior contradicts the specification, which mandates that implementations must ignore any keys they do not understand.

Refer to the CTAP2.1 specification, which states:

"If map keys are present that an implementation does not understand, they MUST be ignored. Note that this enables additional fields to be used as new features are added without breaking existing implementations."

Our hardware token includes the userSelected member in the authenticatorGetAssertion response structure. After investigation, I identified that this line in the code is responsible for rejecting the entire response.

Although I have not reviewed other commands in depth, the "ignore unknown keys" principle applies universally to all responses returned by the authenticator.

Thank you for reviewing this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading authenticator-rs/src/ctap2/commands/get_assertion.rs around line 792 and compare its response handling with the CTAP2.1 message-encoding requirement. Review the other authenticator response commands for the same behavior; the work is done when unknown response keys, including userSelected, are ignored rather than causing rejection.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.