mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+d99f3a288cc7d8ef60fb@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: Re: [syzbot] [media?] general protection fault in su3000_i2c_transfer
Date: Thu, 21 Aug 2025 18:41:36 -0700	[thread overview]
Message-ID: <68a7cad0.050a0220.37038e.0048.GAE@google.com> (raw)
In-Reply-To: <68a7b69f.050a0220.37038e.0047.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [media?] general protection fault in su3000_i2c_transfer
Author: lizhi.xu@windriver.com

#syz test

diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index e9577f920286..17b0bec53e21 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -257,7 +257,7 @@ static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client,
 	res = 0;
 	for (i = 0; i < nmsgs; i++) {
 		/* Limit the size of the message to a sane amount */
-		if (msgs[i].len > 8192) {
+		if (msgs[i].len > 8192 || msgs[i].len == 0) {
 			res = -EINVAL;
 			break;
 		}

  reply	other threads:[~2025-08-22  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  0:15 syzbot
2025-08-22  1:41 ` syzbot [this message]
2025-08-22  2:09 ` [PATCH] i2c: dev: Block zero-length messages Lizhi Xu
2025-12-08  2:25 ` Forwarded: [PATCH] media: dw2102: validate I2C messages in su3000_i2c_transfer() syzbot
2025-12-08  2:33 ` syzbot

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=68a7cad0.050a0220.37038e.0048.GAE@google.com \
    --to=syzbot+d99f3a288cc7d8ef60fb@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®