All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kyle Tso" <kyletso@google.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: Fix out-of-bounds read of the pds and pd_list arrays
Date: Tue, 13 Oct 2026 08:29:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-169253@kernel.org> (raw)
In-Reply-To: <20261013081549.2375441-1-kyletso@google.com>

> select_usb_power_delivery_show() iterates through port->pds (via the
> pd_get() callback) and tcpm_find_pd_data() iterates through
> port->pd_list until they find a NULL entry. However, tcpm_fw_get_caps()
> allocates only port->pd_count entries for each array, and
> tcpm_port_register_pd() fills all of them. Without a NULL terminator,
> both loops read and dereference one entry past the end:
> 
>   Unable to handle kernel paging request at virtual address
>   adacafaea9a8ac1a
>   Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
>   pc : select_usb_power_delivery_show+0xa4/0x110
>   lr : select_usb_power_delivery_show+0x90/0x110
>   Call trace:
>    select_usb_power_delivery_show+0xa4/0x110
>    dev_attr_show+0x38/0x74
> [ ... ]
> 
> Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
> Cc: stable@vger.kernel.org
> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
> Signed-off-by: Kyle Tso <kyletso@google.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261013081549.2375441-1-kyletso@google.com?part=1


      reply	other threads:[~2026-10-13  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  8:15 [PATCH v1] usb: typec: tcpm: Fix out-of-bounds read of the pds and pd_list arrays Kyle Tso
2026-10-13  8:29 ` sashiko-bot [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=sashiko-outbox-169253@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kyletso@google.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.