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:   Thu,  7 Apr 2022 11:14:52 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     Liviu Dudau <liviu.dudau@....com>,
        Kees Cook <keescook@...omium.org>
Cc:     Sudeep Holla <sudeep.holla@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Russell King <linux@...linux.org.uk>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] ARM: vexpress/spc: Avoid negative array index when !SMP

On Thu, 31 Mar 2022 12:04:43 -0700, Kees Cook wrote:
> When building multi_v7_defconfig+CONFIG_SMP=n, -Warray-bounds exposes
> a couple negative array index accesses:
> 
> arch/arm/mach-vexpress/spc.c: In function 've_spc_clk_init':
> arch/arm/mach-vexpress/spc.c:583:21: warning: array subscript -1 is below array bounds of 'bool[2]' {aka '_Bool[2]'} [-Warray-bounds]
>   583 |   if (init_opp_table[cluster])
>       |       ~~~~~~~~~~~~~~^~~~~~~~~
> arch/arm/mach-vexpress/spc.c:556:7: note: while referencing 'init_opp_table'
>   556 |  bool init_opp_table[MAX_CLUSTERS] = { false };
>       |       ^~~~~~~~~~~~~~
> arch/arm/mach-vexpress/spc.c:592:18: warning: array subscript -1 is below array bounds of 'bool[2]' {aka '_Bool[2]'} [-Warray-bounds]
>   592 |    init_opp_table[cluster] = true;
>       |    ~~~~~~~~~~~~~~^~~~~~~~~
> arch/arm/mach-vexpress/spc.c:556:7: note: while referencing 'init_opp_table'
>   556 |  bool init_opp_table[MAX_CLUSTERS] = { false };
>       |       ^~~~~~~~~~~~~~
> 
> [...]


Applied to sudeep.holla/linux (fixes/vexpress), thanks!

[1/1] ARM: vexpress/spc: Avoid negative array index when !SMP
      https://git.kernel.org/sudeep.holla/c/b3f1dd52c9

--
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ