From: Prashant Malani <pmalani@chromium.org>
To: Victor Ding <victording@chromium.org>
Cc: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev,
groeck@chromium.org, dustin@howett.net, gustavoars@kernel.org,
gregkh@linuxfoundation.org, sebastian.reichel@collabora.com,
dnojiri@chromium.org, lee.jones@linaro.org, bleung@chromium.org,
tinghan.shen@mediatek.com, tzungbi@kernel.org,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH v2] platform/chrome: cros_ec_typec: zero out stale pointers
Date: Wed, 7 Dec 2022 22:54:17 +0000 [thread overview]
Message-ID: <Y5EZmSSbOFRpfBNj@chromium.org> (raw)
In-Reply-To: <20221207093924.v2.1.I1864b6a7ee98824118b93677868d22d3750f439b@changeid>
On Dec 07 09:39, Victor Ding wrote:
> `cros_typec_get_switch_handles` allocates four pointers when obtaining
> type-c switch handles. These pointers are all freed if failing to obtain
> any of them; therefore, pointers in `port` become stale. The stale
> pointers eventually cause use-after-free or double free in later code
> paths. Zeroing out all pointer fields after freeing to eliminate these
> stale pointers.
>
> Fixes: f28adb41dab4 ("platform/chrome: cros_ec_typec: Register Type C switches")
> Fixes: 1a8912caba02 ("platform/chrome: cros_ec_typec: Get retimer handle")
> Signed-off-by: Victor Ding <victording@chromium.org>
Acked-by: Prashant Malani <pmalani@chromium.org>
Hey Tzung-Bi, it looks like you've already created a tag for the
v6.2 pull request, so I don't know if it's too late to apply this
for the current dev cycle.
So, I've not applied it, but have left the Acked-by tag.
Please feel free to apply it if there's still room for it before
you send out the pull request.
Thanks!
next prev parent reply other threads:[~2022-12-07 22:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 9:39 [PATCH v2] platform/chrome: cros_ec_typec: zero out stale pointers Victor Ding
2022-12-07 22:54 ` Prashant Malani [this message]
2022-12-08 2:01 ` Tzung-Bi Shih
2022-12-08 2:00 ` patchwork-bot+chrome-platform
2022-12-08 2:00 ` patchwork-bot+chrome-platform
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=Y5EZmSSbOFRpfBNj@chromium.org \
--to=pmalani@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dnojiri@chromium.org \
--cc=dustin@howett.net \
--cc=enric.balletbo@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=gustavoars@kernel.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=tinghan.shen@mediatek.com \
--cc=tzungbi@kernel.org \
--cc=victording@chromium.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