Re: [PATCH v2] crypto/testmgr: don't copy from source IV too much

2015-09-11 Thread Herbert Xu
On Thu, Sep 10, 2015 at 01:11:55PM +0300, Andrey Ryabinin wrote: > 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-

[PATCH v2] crypto/testmgr: don't copy from source IV too much

2015-09-10 Thread Andrey Ryabinin
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 --- crypto/testmgr.c | 5 +++-- 1 file changed, 3 ins