lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 1 Jul 2022 22:49:22 +0900
From:   Chanwoo Choi <cwchoi00@...il.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Christian Marangi <ansuelsmth@...il.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Linux PM list <linux-pm@...r.kernel.org>,
        linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH v2] PM / devfreq: exynos-bus: Fix NULL pointer dereference

Dear Rafael,

The pull request[1] has an  issue for exynos-bus.c devfreq driver
and then fixed it by this patch.

If possible, could you please apply this patch to linux-pm.git
directly for 5.19-rc5?

[1] "[GIT,PULL] devfreq fixes for 5.19-rc5"
- https://patchwork.kernel.org/project/linux-pm/patch/03056170-6501-3f4d-0331-37866d12330e@gmail.com/

Best Regards,
Chanwoo Choi

On Fri, Jul 1, 2022 at 10:45 PM Christian Marangi <ansuelsmth@...il.com> wrote:
>
> Fix exynos-bus NULL pointer dereference by correctly using the local
> generated freq_table to output the debug values instead of using the
> profile freq_table that is not used in the driver.
>
> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Fixes: b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")
> Cc: stable@...r.kernel.org
> Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> Acked-by: Chanwoo Choi <cw00.choi@...sung.com>
> ---
>  drivers/devfreq/exynos-bus.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index b5615e667e31..79725bbb4bb0 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -447,9 +447,9 @@ static int exynos_bus_probe(struct platform_device *pdev)
>                 }
>         }
>
> -       max_state = bus->devfreq->profile->max_state;
> -       min_freq = (bus->devfreq->profile->freq_table[0] / 1000);
> -       max_freq = (bus->devfreq->profile->freq_table[max_state - 1] / 1000);
> +       max_state = bus->devfreq->max_state;
> +       min_freq = (bus->devfreq->freq_table[0] / 1000);
> +       max_freq = (bus->devfreq->freq_table[max_state - 1] / 1000);
>         pr_info("exynos-bus: new bus device registered: %s (%6ld KHz ~ %6ld KHz)\n",
>                         dev_name(dev), min_freq, max_freq);
>
> --
> 2.36.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ