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]
Message-ID: <6436838e-8b2d-4727-b207-e6c3168960e5@huawei.com>
Date: Mon, 30 Sep 2024 17:53:42 +0800
From: "zhangzekun (A)" <zhangzekun11@...wei.com>
To: Jinjie Ruan <ruanjinjie@...wei.com>
CC: <andersson@...nel.org>, <konradybcio@...nel.org>,
	<ulf.hansson@...aro.org>, <linux-pm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH] pmdomain: qcom: cpr: Fix possible uninitialized value

Hi, Jinjie

I have sent a patch with the same modification before:

https://lore.kernel.org/linux-pm/20240926134211.45394-1-zhangzekun11@huawei.com/

Best Regards,
Zekun

在 2024/9/30 17:44, Jinjie Ruan 写道:
> of_property_read_u64() can fail and left "rate" uninitialized,
> and the zero check in cpr_corner_init() for cpr_get_opp_hz_for_req()
> can not prevent it and it will assign cdata[level - 1].freq to random
> value, so init it to fix it.
> 
> Cc: stable@...r.kernel.org # v6.12
> Fixes: 181c8148556a ("pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code.")
> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
> ---
>   drivers/pmdomain/qcom/cpr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pmdomain/qcom/cpr.c b/drivers/pmdomain/qcom/cpr.c
> index e1fca65b80be..26a60a101e42 100644
> --- a/drivers/pmdomain/qcom/cpr.c
> +++ b/drivers/pmdomain/qcom/cpr.c
> @@ -1052,7 +1052,7 @@ static unsigned long cpr_get_opp_hz_for_req(struct dev_pm_opp *ref,
>   			of_parse_phandle(child_np, "required-opps", 0);
>   
>   		if (child_req_np == ref_np) {
> -			u64 rate;
> +			u64 rate = 0;
>   
>   			of_property_read_u64(child_np, "opp-hz", &rate);
>   			return (unsigned long) rate;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ