Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CF_HASH_MAXBLK too low for HMAC-SHA3 #14

Open
zerynth opened this issue Aug 6, 2019 · 0 comments
Open

CF_HASH_MAXBLK too low for HMAC-SHA3 #14

zerynth opened this issue Aug 6, 2019 · 0 comments

Comments

@zerynth
Copy link

zerynth commented Aug 6, 2019

Hello and kudos for the awesome project.

While investigating a bug report in our platform we think we have found a bug in the hmac implementation.

cf_hmac_init uses temporary buffers k and blk that are initialized at a size of CF_CHASH_MAXBLK=128. However, the block sizes for sha3-224 and sha3-256 are 144 and 136, causing a buffer overflow on the memset at hmac.c:53

A simple fix is setting CF_CHASH_MAXBLK at 144

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant