Skip to content

Fix possible heap buffer overflow in argon2i_32#20

Merged
mliberty1 merged 3 commits into
mainfrom
hotfix/argon_nb_blocks
Jun 1, 2026
Merged

Fix possible heap buffer overflow in argon2i_32#20
mliberty1 merged 3 commits into
mainfrom
hotfix/argon_nb_blocks

Conversation

@mliberty1
Copy link
Copy Markdown
Member

A heap buffer overflow (write) exists in the argon2i_32() function in c_monocypher.pyx. The nb_blocks parameter is accepted directly from the caller and passed to the underlying crypto_argon2() C function without validation. When nb_blocks is less than 8, the internal Argon2 implementation performs a heap write 1024 bytes past the end of the allocated work area, resulting in memory corruption.

Thank you Haris (hextheshadow) for the vulnerability report & fix.

mliberty1 added 3 commits June 1, 2026 15:59
* Added Python 3.14 to setup.py
* Bumped GitHub actions versions.
* Fixed debian package build to run after python release.
* Updated changelog.
@mliberty1 mliberty1 merged commit 94409ed into main Jun 1, 2026
56 of 57 checks passed
@mliberty1 mliberty1 deleted the hotfix/argon_nb_blocks branch June 1, 2026 20:41
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.

1 participant