]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - Fill the result buffer only on digest, finup, and final ops
authorGary R Hook <gary.hook@amd.com>
Wed, 7 Mar 2018 17:37:42 +0000 (11:37 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 12:29:50 +0000 (14:29 +0200)
commite5733429718707a15b720de8c8b34c9e09ffad6f
treeaaf7a919b4ad86b796c27232e152cc921b5e9684
parentc48f60c1a9854acc2fb9adcb4429043002dd4e6f
crypto: ccp - Fill the result buffer only on digest, finup, and final ops

commit 0ee991be4cdd88587aedbf68cdacd1765f57236a upstream.

Any change to the result buffer should only happen on final, finup
and digest operations. Changes to the buffer for update, import, export,
etc, are not allowed.

Fixes: 66d7b9f6175e ("crypto: testmgr - test misuse of result in ahash")
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c