public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: typec: qcom-pmic: fix use-after-free on late probe errors
@ 2024-04-18 14:57 Johan Hovold
  2024-04-18 14:57 ` [PATCH 1/2] " Johan Hovold
  2024-04-18 14:57 ` [PATCH 2/2] usb: typec: qcom-pmic: fix pdphy start() error handling Johan Hovold
  0 siblings, 2 replies; 9+ messages in thread
From: Johan Hovold @ 2024-04-18 14:57 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus
  Cc: Bjorn Andersson, Konrad Dybcio, Greg Kroah-Hartman,
	Dmitry Baryshkov, linux-arm-msm, linux-usb, linux-kernel,
	Johan Hovold

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-22 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 14:57 [PATCH 0/2] usb: typec: qcom-pmic: fix use-after-free on late probe errors Johan Hovold
2024-04-18 14:57 ` [PATCH 1/2] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox