]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - handle zero-length AEAD output
authorHoria Geantă <horia.geanta@nxp.com>
Tue, 22 Jan 2019 14:47:01 +0000 (16:47 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Feb 2019 06:42:03 +0000 (14:42 +0800)
commitdb05d9556082e33270486c284ac572f2641c4557
tree7cf6bdd30cc6cc561ce418cfd6411e3aadc65bcb
parent9d6809066ecf025700904dde39a4708a1031fce0
crypto: caam - handle zero-length AEAD output

Recent AEAD changes in testmgr framework introduced by commit
6ac6c34e5c59 ("crypto: testmgr - unify the AEAD encryption and decryption test vectors")
uncovered an error in the CAAM drivers, since they don't correctly
handle the case when AEAD output length is zero.

Add checks to avoid feeding zero-length req->dst to DMA API.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c