Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: skcipher - Pass statesize for simple lskcipher instances

When ecb is used to wrap an lskcipher, the statesize isn't set
correctly. Fix this by making the simple instance creator set
the statesize.

Reported-by: syzbot+8ffb0839a24e9c6bfa76@syzkaller.appspotmail.com
Reported-by: Edward Adam Davis <eadavis@qq.com>
Fixes: 662ea18d089b ("crypto: skcipher - Make use of internal state")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+1
+1
crypto/lskcipher.c
··· 642 642 inst->alg.co.min_keysize = cipher_alg->co.min_keysize; 643 643 inst->alg.co.max_keysize = cipher_alg->co.max_keysize; 644 644 inst->alg.co.ivsize = cipher_alg->co.base.cra_blocksize; 645 + inst->alg.co.statesize = cipher_alg->co.statesize; 645 646 646 647 /* Use struct crypto_lskcipher * by default, can be overridden */ 647 648 inst->alg.co.base.cra_ctxsize = sizeof(struct crypto_lskcipher *);