]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - use correct internal state sizes for export
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 Apr 2019 13:39:02 +0000 (16:39 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:15 +0000 (15:38 +0800)
commit761cce09ac90f182642c35f5caf047cc47b28639
tree812b2022d64e0cf141f4fe665a69f69ee039d476
parente11f5caf243c778286d5110c22707fe013ad23ba
crypto: ccree - use correct internal state sizes for export

We were computing the size of the import buffer based on the digest size
but the 318 and 224 byte variants use 512 and 256 bytes internal state
sizes respectfully, thus causing the import buffer to overrun.

Fix it by using the right sizes.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_hash.c