]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: testmgr - don't copy from source IV too much
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Thu, 10 Sep 2015 10:11:55 +0000 (13:11 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Sep 2015 14:09:43 +0000 (22:09 +0800)
commit35be2b26e525898d925052e51065dfd076f9fc2e
tree4ae19b43c59091f110a1094c7de60cd5d249f026
parentc1b91e183468a59008c1b0b126dc1dd0e5b49b5d
crypto: testmgr - don't copy from source IV too much

While the destination buffer 'iv' is MAX_IVLEN size,
the source 'template[i].iv' could be smaller, thus
memcpy may read read invalid memory.
Use crypto_skcipher_ivsize() to get real ivsize
and pass it to memcpy.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c