chacha20/poly1305: make sure to clear the buffer at correct position
authorRichard Levitte <levitte@openssl.org>
Fri, 4 Nov 2016 13:21:46 +0000 (14:21 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 10 Nov 2016 13:04:11 +0000 (13:04 +0000)
commitbf52165bda53524a267c784696bd074111a2f178
tree710c07a4175062ccf8352192dfd797bb657cc558
parenta54aba531327285f64cf13a909bc129e9f9d5970
chacha20/poly1305: make sure to clear the buffer at correct position

The offset to the memory to clear was incorrect, causing a heap buffer
overflow.

CVE-2016-7054

Thanks to Robert Święcki for reporting this

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/evp/e_chacha20_poly1305.c