irtimmer / tpm2-pk11

[DEPRECATED] PKCS#11 Module for TPM 2.0
BSD 2-Clause "Simplified" License
68 stars 24 forks source link

Memory copy out of bounds? #56

Closed jturnsek closed 6 years ago

jturnsek commented 6 years ago

memcpy(digest.TSS_COMPAT_TMPB(buffer), hash - digestSize + hash_length, hash_length)

line of code in tpm_sign should have lenght of digestSize instead of hash_length.

Am I right?

irtimmer commented 6 years ago

Yes, that seems indeed like a small mistake and have been fixed with commit 0876bca