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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221112020528.7837-3-lihuisong@huawei.com>
Date:   Sat, 12 Nov 2022 10:05:28 +0800
From:   Huisong Li <lihuisong@...wei.com>
To:     <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <rafael@...nel.org>, <sudeep.holla@....com>,
        <rafael.j.wysocki@...el.com>, <wanghuiqiang@...wei.com>,
        <zhangzekun11@...wei.com>, <wangxiongfeng2@...wei.com>,
        <tanxiaofei@...wei.com>, <guohanjun@...wei.com>,
        <xiexiuqi@...wei.com>, <wangkefeng.wang@...wei.com>,
        <huangdaode@...wei.com>, <lihuisong@...wei.com>
Subject: [PATCH V3 2/2] mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure

Currently, 'pcc_chan_count' is remains set to a non-zero value if PCC
subspaces are parsed successfully but something else fail later during
the initial PCC probing phase. This will result in pcc_mbox_request_channel
trying to access the resources that are not initialised or allocated and
may end up in a system crash.

Reset pcc_chan_count to 0 when the PCC probe fails in order to prevent
the possible issue as described above.

Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe")
Signed-off-by: Huisong Li <lihuisong@...wei.com>
Reviewed-by: Sudeep Holla <sudeep.holla@....com>
---
 drivers/mailbox/pcc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 3c2bc0ca454c..105d46c9801b 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -743,6 +743,7 @@ static int __init pcc_init(void)
 
 	if (IS_ERR(pcc_pdev)) {
 		pr_debug("Err creating PCC platform bundle\n");
+		pcc_chan_count = 0;
 		return PTR_ERR(pcc_pdev);
 	}
 
-- 
2.22.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ