Buffer overflow in hmac setup on known unsupported algorithm, with long input #254
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto#254
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
When calling
psa_mac_sign_setup()for HMAC with a known but unsupported algorithm and a key that's longer than the block size, a buffer overflow occurs.This happens in
psa_hmac_setup_internal(), ifpsa_hash_setup() orpsa_hash_update()fail, and thekey_length` is larger than PSA_HMAC_MAX_HASH_BLOCK_SIZE, because at the cleanup we do the following:Issue request type
Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-894