Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Ari Kauppi
> On 10.5.2017, at 0.14, Colin Ian King wrote: > > On 09/05/17 22:03, J . Bruce Fields wrote: >> On Tue, May 09, 2017 at 05:04:14PM +0300, Dan Carpenter wrote: >>> On Tue, May 09, 2017 at 02:31:21PM +0100, Colin King wrote: diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 1db

Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Colin Ian King
On 09/05/17 22:03, J . Bruce Fields wrote: > On Tue, May 09, 2017 at 05:04:14PM +0300, Dan Carpenter wrote: >> On Tue, May 09, 2017 at 02:31:21PM +0100, Colin King wrote: >>> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c >>> index 1dbf62190bee..c453a1998e00 100644 >>> --- a/fs/nfsd/nfs4proc.

Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread J . Bruce Fields
On Tue, May 09, 2017 at 05:04:14PM +0300, Dan Carpenter wrote: > On Tue, May 09, 2017 at 02:31:21PM +0100, Colin King wrote: > > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c > > index 1dbf62190bee..c453a1998e00 100644 > > --- a/fs/nfsd/nfs4proc.c > > +++ b/fs/nfsd/nfs4proc.c > > @@ -1259,7

Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Dan Carpenter
On Tue, May 09, 2017 at 02:31:21PM +0100, Colin King wrote: > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c > index 1dbf62190bee..c453a1998e00 100644 > --- a/fs/nfsd/nfs4proc.c > +++ b/fs/nfsd/nfs4proc.c > @@ -1259,7 +1259,8 @@ nfsd4_layout_verify(struct svc_export *exp, unsigned > int layo

[PATCH] nfsd: avoid out of bounds read on array nfsd4_layout_ops

2017-05-09 Thread Colin King
From: Colin Ian King Array nfsd4_layout_ops has LAYOUT_TYPE_MAX elements (which is currently just 6), so check for this upper bound rather than the hard coded upper bound of 32 to avoid an out of bounds read on array nfsd4_layout_ops. Detected by CoverityScan, CID#1433518 ("Out-of-bounds read")