Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-03-02 Thread Colin Ian King
On 02/03/2021 08:44, Krzysztof Kozlowski wrote: > On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: >> From: Colin Ian King >> >> Currently the array gpmc_cs is indexed by cs before it cs is range checked >> and the pointer read from this out-of-index read is dereferenced. Fix this >>

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-03-02 Thread Krzysztof Kozlowski
On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: > From: Colin Ian King > > Currently the array gpmc_cs is indexed by cs before it cs is range checked > and the pointer read from this out-of-index read is dereferenced. Fix this > by performing the range check on cs before the read and

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-25 Thread Tony Lindgren
* Krzysztof Kozlowski [210224 08:11]: > On Wed, Feb 24, 2021 at 10:55:52AM +0300, Dan Carpenter wrote: > > On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: > > > From: Colin Ian King > > > > > > Currently the array gpmc_cs is indexed by cs before it cs is range checked > > > and the

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-24 Thread Colin Ian King
On 24/02/2021 07:55, Dan Carpenter wrote: > On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: >> From: Colin Ian King >> >> Currently the array gpmc_cs is indexed by cs before it cs is range checked >> and the pointer read from this out-of-index read is dereferenced. Fix this >> by

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-24 Thread Krzysztof Kozlowski
On Wed, Feb 24, 2021 at 10:55:52AM +0300, Dan Carpenter wrote: > On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: > > From: Colin Ian King > > > > Currently the array gpmc_cs is indexed by cs before it cs is range checked > > and the pointer read from this out-of-index read is

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-23 Thread Dan Carpenter
On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: > From: Colin Ian King > > Currently the array gpmc_cs is indexed by cs before it cs is range checked > and the pointer read from this out-of-index read is dereferenced. Fix this > by performing the range check on cs before the read and

Re: [PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-23 Thread Krzysztof Kozlowski
On Tue, Feb 23, 2021 at 07:38:21PM +, Colin King wrote: > From: Colin Ian King > > Currently the array gpmc_cs is indexed by cs before it cs is range checked > and the pointer read from this out-of-index read is dereferenced. Fix this > by performing the range check on cs before the read and

[PATCH] memory: gpmc: fix out of bounds read and dereference on gpmc_cs[]

2021-02-23 Thread Colin King
From: Colin Ian King Currently the array gpmc_cs is indexed by cs before it cs is range checked and the pointer read from this out-of-index read is dereferenced. Fix this by performing the range check on cs before the read and the following pointer dereference. Addresses-Coverity: ("Negative