mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>
To: Jiale Yao <yaojiale02@163.com>, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	stuart.a.hayhurst@gmail.com
Subject: Re: [PATCH 2/4] HID: corsair-void: fix out-of-bounds read in corsair_void_raw_event
Date: Fri, 17 Jul 2026 23:55:01 +0100	[thread overview]
Message-ID: <41f36ffa-0f07-4237-ac30-990d7a5c1ca6@gmail.com> (raw)
In-Reply-To: <20260714131611.269929-2-yaojiale02@163.com>

Hi,

Looking through this, I had a couple thoughts:

  - It should send a warning for unexpected sizes, since most likely 
it's a format we haven't seen yet

  - 5 is a bit of a magic number, especially as some packets of other 
sizes pass through, but we don't do anything with them (yet?)

  - AFAIK returning 0 indicates everything was OK, when actually we 
bailed out. By convention, shouldn't this return 1 on failure?


The patch I submitted a few weeks ago handled these: 
https://lore.kernel.org/all/20260630010656.626157-3-stuart.a.hayhurst@gmail.com/


Stuart


  reply	other threads:[~2026-07-17 22:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 13:16 [PATCH 1/4] HID: cougar: fix out-of-bounds read in cougar_raw_event Jiale Yao
2026-07-14 13:16 ` [PATCH 2/4] HID: corsair-void: fix out-of-bounds read in corsair_void_raw_event Jiale Yao
2026-07-17 22:55   ` Stuart Hayhurst [this message]
2026-07-14 13:16 ` [PATCH 3/4] HID: mcp2221: fix out-of-bounds read in mcp2221_raw_event Jiale Yao
2026-07-14 13:16 ` [PATCH 4/4] HID: cp2112: fix out-of-bounds read in cp2112_raw_event Jiale Yao

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=41f36ffa-0f07-4237-ac30-990d7a5c1ca6@gmail.com \
    --to=stuart.a.hayhurst@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yaojiale02@163.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