[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f589f15-7531-46cf-9ed9-0e4c6afdcda3@sirena.org.uk>
Date: Mon, 31 Mar 2025 13:16:00 +0100
From: Mark Brown <broonie@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Witold Sadowski <wsadowski@...vell.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2] spi: cadence: Fix out-of-bounds array access in
cdns_mrvl_xspi_setup_clock()
On Fri, Mar 28, 2025 at 09:36:30PM -0700, Josh Poimboeuf wrote:
> If requested_clk > 128, cdns_mrvl_xspi_setup_clock() iterates over the
> entire cdns_mrvl_xspi_clk_div_list array without breaking out early,
> causing 'i' to go beyond the array bounds.
> - while (i < ARRAY_SIZE(cdns_mrvl_xspi_clk_div_list)) {
> + while (i < ARRAY_SIZE(cdns_mrvl_xspi_clk_div_list)-1) {
The usual coding style would be to have spaces around the - here.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists