Skip to content

security(cose): reject non-integer crit labels as CoseMalformed - #171

Merged
luisgf merged 1 commit into
mainfrom
security/audit-170
Aug 13, 2026
Merged

security(cose): reject non-integer crit labels as CoseMalformed#171
luisgf merged 1 commit into
mainfrom
security/audit-170

Conversation

@luisgf

@luisgf luisgf commented Aug 13, 2026

Copy link
Copy Markdown
Owner

_reject_unhandled_crit tested lbl not in frozenset({1, 33}). A CBOR array or map as a crit entry is a legal decoded value and is unhashable, so parse_sign1 raised TypeError — not an OpenvcError. mdoc only re-wraps CoseError, so a DeviceResponse can put this in IssuerAuth protected headers and escape except OpenvcError (I14).

Every crit label must now be a non-bool int before the membership test.

Closes #170

Verified: bash .claude/skills/ship-issue/scripts/gate.sh.

An array or map as a crit entry is legal CBOR and unhashable, so
`lbl not in frozenset` raised TypeError before any crypto.

Closes #170
@luisgf
luisgf merged commit 9d64bc4 into main Aug 13, 2026
13 of 14 checks passed
@luisgf
luisgf deleted the security/audit-170 branch August 13, 2026 15:21
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.

COSE crit with an unhashable label raises TypeError before crypto

1 participant