[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdVnh6_7sTuvVNsu=4chCH4L3OfJ7qKKSCSv-9RyCjyG7Q@mail.gmail.com>
Date: Wed, 11 Jan 2023 16:34:28 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc: Chris Brandt <chris.brandt@...esas.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
linux-renesas-soc@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH v2] clk: renesas: cpg-mssr: Fix use after free if
cpg_mssr_common_init() failed
On Fri, Dec 23, 2022 at 3:40 PM Alexey Khoroshilov
<khoroshilov@...ras.ru> wrote:
> If cpg_mssr_common_init() fails after assigning priv to global variable
> cpg_mssr_priv, it deallocates priv, but cpg_mssr_priv keeps dangling
> pointer that potentially can be used later.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 1f7db7bbf031 ("clk: renesas: cpg-mssr: Add early clock support")
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> ---
> v2: Move cpg_mssr_priv assignment just before return 0; instead of
> clearing it as Geert Uytterhoeven <geert@...ux-m68k.org> suggested.
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
i.e. will queue in renesas-clk-for-v6.3.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists