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>] [day] [month] [year] [list]
Date:   Fri, 16 Aug 2019 23:31:11 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Stephen Boyd <sboyd@...nel.org>,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        Andreas Färber <afaerber@...e.de>,
        Michael Turquette <mturquette@...libre.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>, linux-clk@...r.kernel.org
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: clk: actions: Don't reference clk_init_data after registration
 [bug report]

Hi,

Static analysis with Coverity Scan on linux-next has found an issue with
the following commit:

commit 20cac6d02815edcc0b1c87bc3e8858b3d1fda3fa
Author: Stephen Boyd <sboyd@...nel.org>
Date:   Wed Jul 31 12:35:09 2019 -0700

    clk: actions: Don't reference clk_init_data after registration

The analysis is as follows:

7        int i, ret;

  1. var_decl: Declaring variable hw without initializer.

68        struct clk_hw *hw;
69

  2. Condition i < hw_clks->num, taking true branch.

70        for (i = 0; i < hw_clks->num; i++) {

  CID 85252 (#1 of 1): Uninitialized pointer read (UNINIT)
  3. uninit_use:  Using uninitialized value hw.

71                const char *name = hw->init->name;
72
73                hw = hw_clks->hws[i];

hw is being dereferenced on line 71 however it is not assigned until
line 73.

Did you instead intent this to be:

		const char *name;

		hw = hw_clks->hws[i];
		name = hw->init->name;

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ