From: Johan Hovold <johan+linaro@kernel.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH 0/2] usb: typec: qcom-pmic: fix use-after-free on late probe errors
Date: Thu, 18 Apr 2024 16:57:28 +0200 [thread overview]
Message-ID: <20240418145730.4605-1-johan+linaro@kernel.org> (raw)
When reviewing a patch updating the qcom-pmic typec driver, I noticed
that the error handling is broken and can lead to use-after-free.
This series addresses the use-after-free and also fixes the error
handling in the pdphy_start() callback which failed to disable its
supply in all error paths.
The latter fix is not marked for stable on purpose as its not a critical
fix (I'm sure autosel will disagree).
Johan
Johan Hovold (2):
usb: typec: qcom-pmic: fix use-after-free on late probe errors
usb: typec: qcom-pmic: fix pdphy start() error handling
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 8 ++++++--
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 11 +++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
--
2.43.2
next reply other threads:[~2024-04-18 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 14:57 Johan Hovold [this message]
2024-04-18 14:57 ` [PATCH 1/2] usb: typec: qcom-pmic: fix use-after-free on late probe errors Johan Hovold
2024-04-18 17:45 ` Dmitry Baryshkov
2024-04-18 23:41 ` Bryan O'Donoghue
2024-04-22 11:13 ` Heikki Krogerus
2024-04-18 14:57 ` [PATCH 2/2] usb: typec: qcom-pmic: fix pdphy start() error handling Johan Hovold
2024-04-18 18:00 ` Dmitry Baryshkov
2024-04-18 23:41 ` Bryan O'Donoghue
2024-04-22 11:20 ` Heikki Krogerus
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=20240418145730.4605-1-johan+linaro@kernel.org \
--to=johan+linaro@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).