From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 1/3] usb: ucsi: Fix NULL pointer deref in ucsi_connector_change()
Date: Tue, 7 Mar 2023 10:28:58 +0100 [thread overview]
Message-ID: <ZAcD2qC4KUMkdOmx@kroah.com> (raw)
In-Reply-To: <ZAcBEX4p7uqNL1lg@kuha.fi.intel.com>
On Tue, Mar 07, 2023 at 11:17:05AM +0200, Heikki Krogerus wrote:
> Hi Hans,
>
> On Mon, Mar 06, 2023 at 11:33:57AM +0100, Hans de Goede wrote:
> > When ucsi_init() fails, ucsi->connector is NULL, yet in case of
> > ucsi_acpi we may still get events which cause the ucs_acpi code to call
> > ucsi_connector_change(), which then derefs the NULL ucsi->connector
> > pointer.
> >
> > Fix this by not setting ucsi->ntfy inside ucsi_init() until ucsi_init()
> > has succeeded, so that ucsi_connector_change() ignores the events
> > because UCSI_ENABLE_NTFY_CONNECTOR_CHANGE is not set in the ntfy mask.
> >
> > Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> There is now a bug report for this in the kernel.org bugzilla. Can you
> add a Link tag pointing to it so the it gets updated automagically:
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217106
My tools should pick this up, thanks.
greg k-h
next prev parent reply other threads:[~2023-03-07 9:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 10:33 [PATCH v2 0/3] usb: ucsi: 3 bug fixes Hans de Goede
2023-03-06 10:33 ` [PATCH v2 1/3] usb: ucsi: Fix NULL pointer deref in ucsi_connector_change() Hans de Goede
2023-03-07 7:32 ` Heikki Krogerus
2023-03-07 9:17 ` Heikki Krogerus
2023-03-07 9:28 ` Greg Kroah-Hartman [this message]
2023-03-06 10:33 ` [PATCH v2 2/3] usb: ucsi: Fix ucsi->connector race Hans de Goede
2023-03-07 7:46 ` Heikki Krogerus
2023-03-06 10:33 ` [PATCH v2 3/3] usb: ucsi_acpi: Increase the command completion timeout Hans de Goede
2023-03-07 7:47 ` 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=ZAcD2qC4KUMkdOmx@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--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.