]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 05:34:29 +0000 (21:34 -0800)
commitd368a1e8eb230126eb2cbe19f56ff60b9f95169d
tree451a95e728d4b26bb52bb6dd89ee232644f70851
parent83c2104a99da69885da1381ab3eeabb04467c7fc
crypto: testmgr - don't copy from source IV too much

Orabug: 25243093

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>
(cherry picked from commit 84cba178a3b88efe2668a9039f70abda072faa21)
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
crypto/testmgr.c