From: Greg KH <gregkh@linuxfoundation.org>
To: Jameson Thies <jthies@google.com>
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, bleung@chromium.org,
akuchynski@chromium.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] usb: typec: ucsi: displayport: Fix OOB altmode array index
Date: Thu, 10 Sep 2026 14:39:37 +0200 [thread overview]
Message-ID: <2026091023-numeric-husband-1b03@gregkh> (raw)
In-Reply-To: <20260904234401.2339633-1-jthies@google.com>
On Fri, Sep 04, 2026 at 11:44:01PM +0000, Jameson Thies wrote:
> The UCSI displayport driver indexes the connector's port altmode array
> with the GET_CURRENT_CAM response after checking it is not 0xff. The
> port altmode array is UCSI_MAX_ALTMODES elements long. If the PPM
> returns an invalid GET_CURRENT_CAM response above UCSI_MAX_ALTMODES and
> not equal to 0xff, the kernel may crash with an array index OOB error.
>
> Update the UCSI displayport driver to verify the current cam is less
> than UCSI_MAX_ALTMODES before accessing the port altmode array.
>
> Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jameson Thies <jthies@google.com>
> ---
> Changes in v2:
> - removed 0xff alt mode assignement when GET_CURRENT_CAM returns an error.
> - return -EINVAL when alt mode index above UCSI_MAX_ALTMODES is returned.
Does not apply against 7.3-rc2 :(
next prev parent reply other threads:[~2026-09-10 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 23:44 [PATCH v2] usb: typec: ucsi: displayport: Fix OOB altmode array index Jameson Thies
2026-09-05 0:53 ` Benson Leung
2026-09-07 9:44 ` Andrei Kuchynski
2026-09-07 17:43 ` Heikki Krogerus
2026-09-10 12:39 ` Greg KH [this message]
2026-09-10 19:52 ` Jameson Thies
2026-09-11 5:54 ` Greg KH
2026-09-11 18:27 ` Jameson Thies
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=2026091023-numeric-husband-1b03@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akuchynski@chromium.org \
--cc=bleung@chromium.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@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 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.