Fix incorrect error path in ecc_sign_hash_internal.c #801
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt#801
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
There is an incorrect error path in
src/pk/ecc/ecc_sign_hash_internal.cwhen the input buffer is too large for MAXBLOCKSIZE.The code currently jumps to error, but at this point pubkey has not been initialized yet. The error cleanup path calls
ecc_free(&pubkey), which can cause it to operate on uninitialized stack data.Affected code
src/pk/ecc/ecc_sign_hash_internal.c:47Suggested Fix