]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - Clamp AEAD SG list by input length
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 8 Jun 2015 08:38:24 +0000 (16:38 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 9 Jun 2015 14:25:58 +0000 (22:25 +0800)
commit88498d9b1fdd53b23998ae0d02fb69fcca4d70f8
tree60dfee06ecc515fa9113c1fd98b46ece0b6a7845
parent27487183d28aa3bf8759ae817a66d1a9909790e9
crypto: caam - Clamp AEAD SG list by input length

Currently caam assumes that the SG list contains exactly the number
of bytes required.  This assumption is incorrect.

Up until now this has been harmless.  However with the new AEAD
interface this now breaks as the AD SG list contains more bytes
than just the AD.

This patch fixes this by always clamping the AD SG list by the
specified AD length.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/sg_sw_sec4.h