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-next>] [day] [month] [year] [list]
Date:   Thu,  5 Jan 2017 14:25:25 +0530
From:   Vivek Gautam <vivek.gautam@...eaurora.org>
To:     sboyd@...eaurora.org, mturquette@...libre.com
Cc:     andy.gross@...aro.org, david.brown@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        Georgi Djakov <georgi.djakov@...aro.org>
Subject: [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing

Assign num_parents as 0 while registering fixed rate clocks
in _qcom_cc_register_board_clk(), to make sure the clk framework
doesn't dereference parent.

Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly")

Cc: Georgi Djakov <georgi.djakov@...aro.org>
Signed-off-by: Vivek Gautam <vivek.gautam@...eaurora.org>
---

Based on 'clk-next'. Build tested.

 drivers/clk/qcom/common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index cfab7b400381..df004ead1bef 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -157,6 +157,7 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
 
 		init_data.name = path;
 		init_data.ops = &clk_fixed_rate_ops;
+		init_data.num_parents = 0;
 
 		ret = devm_clk_hw_register(dev, &fixed->hw);
 		if (ret)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ