[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPkR8imukdrZLdfk@stanley.mountain>
Date: Wed, 22 Oct 2025 20:18:42 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: David Lechner <dlechner@...libre.com>,
Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: ad7124: fix possible OOB array access
On Wed, Oct 22, 2025 at 10:15:05AM -0500, David Lechner wrote:
> Reorder the channel bounds check before using it to index into the
> channels array in ad7124_release_config_slot(). This prevents reading
> past the end of the array.
>
> The value read from invalid memory was not used, so this was mostly
> harmless,
I didn't spend a lot of time looking at the callers, but an out of bounds
read will cause a KASAN warning at runtime (hopefully) and if the page
we're reading from isn't mapped then it can cause a crash.
So, it's not like we can exploit this to get root but it potentially
could be annoying.
> but we still should not be reading out of bounds in the first place.
Thanks!
regards,
dan carpenter
Powered by blists - more mailing lists