From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+8ffb0839a24e9c6bfa76@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [crypto?] KASAN: slab-out-of-bounds Read in arc4_crypt
Date: Wed, 20 Dec 2023 18:19:24 +0800 [thread overview]
Message-ID: <tencent_35D11227DD835DA5994ACF968DCFA58B8D07@qq.com> (raw)
In-Reply-To: <000000000000d52e14060cc9c551@google.com>
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..f7727698b797 100644
--- a/crypto/lskcipher.c
+++ b/crypto/lskcipher.c
@@ -205,11 +205,19 @@ static int crypto_lskcipher_crypt_sg(struct skcipher_request *req,
struct crypto_lskcipher **ctx = crypto_skcipher_ctx(skcipher);
u8 *ivs = skcipher_request_ctx(req);
struct crypto_lskcipher *tfm = *ctx;
+ struct lskcipher_alg *alg = crypto_lskcipher_alg(tfm);
struct skcipher_walk walk;
unsigned ivsize;
u32 flags;
int err;
+ static u8 relen;
+ if (!relen) {
+ printk("req: %p, alg: %p, ss: %u, %s\n", req, alg, alg->co.statesize, __func__);
+ *req->__ctx = kzalloc(alg->co.statesize, GFP_KERNEL);
+ req->areqlen += alg->co.statesize;
+ relen = 1;
+ }
ivsize = crypto_lskcipher_ivsize(tfm);
ivs = PTR_ALIGN(ivs, crypto_skcipher_alignmask(skcipher) + 1);
next prev parent reply other threads:[~2023-12-20 10:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 14:43 syzbot
2023-12-19 11:53 ` Edward Adam Davis
2023-12-19 12:09 ` syzbot
2023-12-20 3:49 ` Edward Adam Davis
2023-12-20 4:22 ` syzbot
2023-12-20 6:07 ` Edward Adam Davis
2023-12-20 6:16 ` syzbot
2023-12-20 6:34 ` Edward Adam Davis
2023-12-20 6:43 ` syzbot
2023-12-20 6:56 ` Edward Adam Davis
2023-12-20 7:22 ` syzbot
2023-12-20 10:19 ` Edward Adam Davis [this message]
2023-12-20 10:46 ` syzbot
2023-12-20 12:51 ` Edward Adam Davis
2023-12-20 13:16 ` syzbot
2023-12-20 13:37 ` Edward Adam Davis
2023-12-20 14:11 ` syzbot
2023-12-20 15:32 ` Edward Adam Davis
2023-12-20 16:17 ` syzbot
2023-12-20 15:53 ` [PATCH next] crypto: fix oob " Edward Adam Davis
2023-12-21 0:19 ` Herbert Xu
2023-12-21 1:32 ` Herbert Xu
2023-12-24 18:54 ` kernel test robot
2023-12-21 2:42 ` [PATCH] crypto: skcipher - Pass statesize for simple lskcipher instances Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_35D11227DD835DA5994ACF968DCFA58B8D07@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+8ffb0839a24e9c6bfa76@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®