From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Bartosz Szpila <bszpila@google.com>
Cc: bleung@chromium.org,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Jameson Thies <jthies@google.com>,
Andrei Kuchynski <akuchynski@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
"open list:CHROMEOS EC USB TYPE-C DRIVER"
<chrome-platform@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data
Date: Fri, 2 Oct 2026 02:17:33 +0000 [thread overview]
Message-ID: <ar8UPQ4NBsW55h1m@google.com> (raw)
In-Reply-To: <20261001085714.1086242-1-bszpila@google.com>
On Thu, Oct 01, 2026 at 08:57:13AM +0000, Bartosz Szpila wrote:
> cros_typec_register_altmodes() iterates over sop_disc->svid_count and
> sop_disc->svids[i].mode_count from the EC_CMD_TYPEC_DISCOVERY response
> without validating their bounds.
>
> port->disc_data is allocated as a buffer of EC_PROTO2_MAX_RESPONSE_SIZE
> bytes, and each SVID entry contains a fixed mode_vdo[6] array. If the EC
> returns an out-of-bounds svid_count or mode_count, the loops read past
> the end of the mode_vdo array or the disc_data buffer.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data
commit: 317e7abcaf60b79765dcf35c014edac8b9d37a6e
Thanks!
prev parent reply other threads:[~2026-10-02 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 8:57 Bartosz Szpila
2026-10-01 15:39 ` Andrei Kuchynski
2026-10-02 2:17 ` Tzung-Bi Shih [this message]
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=ar8UPQ4NBsW55h1m@google.com \
--to=tzungbi@kernel.org \
--cc=abhishekpandit@chromium.org \
--cc=akuchynski@chromium.org \
--cc=bleung@chromium.org \
--cc=bszpila@google.com \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=jthies@google.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®