From: Greg KH <gregkh@linuxfoundation.org>
To: Edward Adam Davis <eadavis@qq.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, me@jackdoan.com,
sashiko-bot@kernel.org, sashiko-reviews@lists.linux.dev,
savicaleksa83@gmail.com, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH v4] hwmon: (aquacomputer_d5next) valid the data size before reading the sensor data
Date: Sat, 22 Aug 2026 14:45:27 +0200 [thread overview]
Message-ID: <2026082209-vacancy-duly-c136@gregkh> (raw)
In-Reply-To: <tencent_71B8A5DC0D8A9202DDCBDDA4990FCF928D07@qq.com>
On Sat, Aug 22, 2026 at 08:23:35PM +0800, Edward Adam Davis wrote:
> On Sat, 22 Aug 2026 13:55:35 +0200, Greg KH wrote:
> > On Sat, Aug 22, 2026 at 07:34:35PM +0800, Edward Adam Davis wrote:
> > > The user-forged sensor data is only 65 bytes long; however, aqc_raw_event()
> > > fails to handle cases where the sensor data length is too small when reading
> > > the data, resulting in [1] during the read process.
> >
> > What is "user-forged sensor data"?
> It is the data constructed within the reproducer.
What "reproducer"?
> > > Fixes: 0e35f63f7f4e ("hwmon: add driver for Aquacomputer D5 Next")
> > > Reported-by: syzbot+9ee5f5dc18673d6b2f37@syzkaller.appspotmail.com
> > > Closes: https://syzkaller.appspot.com/bug?extid=9ee5f5dc18673d6b2f37
> > > Tested-by: syzbot+9ee5f5dc18673d6b2f37@syzkaller.appspotmail.com
> > > Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> > > ---
> >
> > Was the Assisted-by: tag forgotten?
> No one has assisted me so far; also, I haven't used this type of tag before.
No LLM was used?
> > > +/* aqc_raw_data_valid()
> > > + * Does not support special-case sensor readings data size check
> >
> > Why not?
> It would be more appropriate for the maintainers of these sensors to add
> the relevant checks.
Why? Shouldn't that be covered here?
> > > + */
> > > +static bool aqc_raw_data_valid(struct aqc_data *priv, int size)
> > > +{
> > > + int off, fan_off, i;
> > > + char *msg;
> > > +
> > > + if (!priv)
> > > + return false;
> > > +
> > > + /* +1 for get_unaligned_be16(), it reads 2 bytes */
> > > + off = priv->serial_number_start_offset + SERIAL_PART_OFFSET + 1;
> > > + if (off >= size) {
> > > + msg = "serial number start offset";
> >
> > That's a lot of debugging code being added, why? Who is going to use
> > that?
> I am not certain that these debug messages are definitely useful;
> I simply included them because I felt they might be helpful.
If you didn't use them when debugging this code, why would it be needed
by anyone else?
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-22 12:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 3:06 [syzbot] [hwmon?] KASAN: slab-out-of-bounds Read in aqc_raw_event syzbot
2026-08-22 4:02 ` Guenter Roeck
2026-08-22 8:07 ` Aleksa Savic
2026-08-22 14:24 ` Guenter Roeck
2026-08-22 5:07 ` Edward Adam Davis
2026-08-22 5:28 ` syzbot
2026-08-22 5:34 ` [PATCH] hwmon: valid the data size before reading the sensor data Edward Adam Davis
2026-08-22 5:44 ` sashiko-bot
2026-08-22 7:45 ` [PATCH v2] " Edward Adam Davis
2026-08-22 7:54 ` Guenter Roeck
2026-08-22 7:57 ` sashiko-bot
2026-08-22 9:14 ` [PATCH v3] hwmon: (aquacomputer_d5next) " Edward Adam Davis
2026-08-22 9:26 ` sashiko-bot
2026-08-22 11:34 ` [PATCH v4] " Edward Adam Davis
2026-08-22 11:47 ` sashiko-bot
2026-08-22 11:55 ` Greg KH
2026-08-22 12:23 ` Edward Adam Davis
2026-08-22 12:45 ` Greg KH [this message]
2026-08-22 13:03 ` Edward Adam Davis
2026-08-22 14:05 ` [PATCH v5] " Edward Adam Davis
2026-08-22 14:20 ` sashiko-bot
2026-08-22 14:25 ` Guenter Roeck
2026-08-22 6:41 ` [PATCH] hwmon: " Guenter Roeck
2026-08-22 7:54 ` Edward Adam Davis
2026-08-22 7:00 ` [syzbot] [hwmon?] KASAN: slab-out-of-bounds Read in aqc_raw_event Edward Adam Davis
2026-08-22 7:44 ` syzbot
2026-08-22 8:38 ` Edward Adam Davis
2026-08-22 9:03 ` 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=2026082209-vacancy-duly-c136@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=eadavis@qq.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=me@jackdoan.com \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=savicaleksa83@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.