Linux I2C development
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Triet Hoang <triet.hoang.dev@gmail.com>
Cc: linux-i2c@vger.kernel.org, bence98@sch.bme.hu,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: cp2615: Validate read length before copying
Date: Thu, 20 Aug 2026 13:57:08 +0200	[thread overview]
Message-ID: <aoYYzhB7Ia6cTTY0@zenone.zhora.eu> (raw)
In-Reply-To: <20260818124737.64478-1-triet.hoang.dev@gmail.com>

Hi Triet,

On Tue, Aug 18, 2026 at 12:47:37PM +0000, Triet Hoang wrote:
> The read_len field comes from the untrusted USB payload, which could
> potentially exceed the client's originally requested buffer length or
> MAX_I2C_SIZE, allowing an out-of-bounds read and write.

have you experienced any issue yourself or are you just
speculating based on the code?

Andi

> Limit read_len to the maximum size of the response buffer and return
> -EPROTO for an invalid response.
> 
> Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>

  parent reply	other threads:[~2026-08-20 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 12:47 [PATCH] i2c: cp2615: Validate read length before copying Triet Hoang
2026-08-19  8:16 ` Markus Elfring
2026-08-20 11:57 ` Andi Shyti [this message]
2026-08-20 15:40   ` Triet Hoang

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=aoYYzhB7Ia6cTTY0@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=bence98@sch.bme.hu \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=triet.hoang.dev@gmail.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