Messages in this thread Patch in this message | | | From | Edward Adam Davis <> | Subject | Re: [syzbot] [crypto?] KASAN: slab-out-of-bounds Read in arc4_crypt | Date | Tue, 19 Dec 2023 19:53:04 +0800 |
| |
please test slab-out-of-bounds Read in arc4_crypt
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 17cb8a20bde6 diff --git a/crypto/lskcipher.c b/crypto/lskcipher.c index a06008e112f3..36968495607d 100644 --- a/crypto/lskcipher.c +++ b/crypto/lskcipher.c @@ -215,6 +215,12 @@ static int crypto_lskcipher_crypt_sg(struct skcipher_request *req, flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; + printk("ivs: %p, v: %d, s: %u, ri: %p, wi: %p, %s\n", + ivs, IS_ERR_OR_NULL(ivs), ivsize, req->iv, walk.iv, __func__); + + if (IS_ERR_OR_NULL(ivs)) + ivs = kzalloc(ivsize, GFP_KERNEL); + if (req->base.flags & CRYPTO_SKCIPHER_REQ_CONT) flags |= CRYPTO_LSKCIPHER_FLAG_CONT; else
| |