From: Stephen Boyd <sboyd@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: conor@kernel.org, Conor Dooley <conor.dooley@microchip.com>,
stable@vger.kernel.org,
Daire McNamara <daire.mcnamara@microchip.com>,
Michael Turquette <mturquette@baylibre.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] clk: microchip: fix potential UAF in auxdev release callback
Date: Thu, 13 Apr 2023 15:43:45 -0700 [thread overview]
Message-ID: <8b602852596974df384b2d7088cadd64.sboyd@kernel.org> (raw)
In-Reply-To: <20230413-critter-synopsis-dac070a86cb4@spud>
Quoting Conor Dooley (2023-04-13 15:20:45)
> From: Conor Dooley <conor.dooley@microchip.com>
>
> Similar to commit 1c11289b34ab ("peci: cpu: Fix use-after-free in
> adev_release()"), the auxiliary device is not torn down in the correct
> order. If auxiliary_device_add() fails, the release callback will be
> called twice, resulting in a UAF. Due to timing, the auxdev code in this
> driver "took inspiration" from the aforementioned commit, and thus its
> bugs too!
>
> Moving auxiliary_device_uninit() to the unregister callback instead
> avoids the issue.
>
> CC: stable@vger.kernel.org
> Fixes: b56bae2dd6fd ("clk: microchip: mpfs: add reset controller")
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
Applied to clk-next
prev parent reply other threads:[~2023-04-13 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 22:20 [PATCH v1] clk: microchip: fix potential UAF in auxdev release callback Conor Dooley
2023-04-13 22:43 ` Stephen Boyd [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=8b602852596974df384b2d7088cadd64.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=claudiu.beznea@microchip.com \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=daire.mcnamara@microchip.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox