]> git.ipfire.org Git - thirdparty/openssl.git/commit
chacha_poly: Use IV_STATE guard to prevent IV reuse
authorMilan Broz <gmazyland@gmail.com>
Mon, 4 May 2026 14:11:32 +0000 (16:11 +0200)
committerNikola Pajkovsky <nikolap@openssl.org>
Tue, 12 May 2026 05:13:44 +0000 (07:13 +0200)
commit78f60e095d0dbcd0438cb360eeedd73d7d10c3ac
treee4e89322a8146024514bbd487749bd9c8c4a557d
parent96012a62aaeb181affda6351037ead9bd0eed649
chacha_poly: Use IV_STATE guard to prevent IV reuse

If IV was set for Chacha20-Poly1305, code should not
allow reusing IV after calling CipherFinal.

Use iv_state (as used in GCM or OCB mode) to prevent that.

Thanks to Alex Gaynor for reporting the issue.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue May 12 05:14:09 2026
(Merged from https://github.com/openssl/openssl/pull/31104)
providers/implementations/ciphers/cipher_chacha20_poly1305.c
providers/implementations/ciphers/cipher_chacha20_poly1305.h