]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - fix copy of next buffer for xcbc and cmac
authorIuliana Prodan <iuliana.prodan@nxp.com>
Fri, 22 Mar 2019 12:12:30 +0000 (14:12 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Mar 2019 05:54:32 +0000 (13:54 +0800)
commit83f906b0fbd1900a21efc4aa697bc9147c594693
tree6c209289547a11d9d16692235aec3fc0540af91d
parent63fc765f68d8922f0fb728b915d6b1b5436fff5c
crypto: caam - fix copy of next buffer for xcbc and cmac

Fix a side effect of adding xcbc support, when the next_buffer is not
copied.
The issue occurs, when there is stored from previous state a blocksize
buffer and received, a less than blocksize, from user. In this case, the
nents for req->src is 0, and the next_buffer is not copied.
An example is:
{
.tap = { 17, 15, 8 },
.psize = 40,
.np = 3,
.ksize = 16,
}

Fixes: 724af353dcf3 ("crypto: caam - add support for xcbc(aes)")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c