Skip to content

u2fhid: reject oversized outgoing payloads - #192

Merged
benma merged 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/u2f-max-payload
Oct 13, 2026
Merged

benma merged 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/u2f-max-payload

Conversation

@benma-agent

Copy link
Copy Markdown
Contributor

U2F HID permits one initialization packet and at most 128 continuation
packets, limiting payloads to 7609 bytes with 64-byte reports. sendFrame
previously emitted continuation sequence numbers above 127, and payloads
larger than 65535 bytes also had their advertised length truncated.

Reject payloads above the protocol limit before allocating packet buffers
or writing to the device. Derive the limit from the report payload sizes.

U2F HID permits one initialization packet and at most 128 continuation
packets, limiting payloads to 7609 bytes with 64-byte reports. sendFrame
previously emitted continuation sequence numbers above 127, and payloads
larger than 65535 bytes also had their advertised length truncated.

Reject payloads above the protocol limit before allocating packet buffers
or writing to the device. Derive the limit from the report payload sizes.

@NickeZ NickeZ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@benma
benma marked this pull request as ready for review October 13, 2026 09:12
@benma
benma merged commit 74d3e8b into BitBoxSwiss:master Oct 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants