Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-03 Thread Frank Filz
> -Original Message- > From: Dominique Martinet [mailto:dominique.marti...@cea.fr] > Sent: Thursday, March 3, 2016 12:46 PM > To: Frank Filz > Cc: 'William Allen Simpson' ; nfs- > ganesha-de...@lists.sourceforge.net > Subject: Re: [Nfs-ganesha-devel] Unbo

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-03 Thread Dominique Martinet
Frank Filz wrote on Wed, Mar 02, 2016 at 05:01:52PM -0800: > > - all arrays are 1k > > Are we sure 1k is enough for all arrays? Couldn't see any array that'd need more. I was thinking readdir results could be, but it's a single opaque so it's fine... But please double-check. >> - all xdr_byte

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-02 Thread Frank Filz
> -Original Message- > From: Dominique Martinet [mailto:dominique.marti...@cea.fr] > Sent: Wednesday, March 2, 2016 4:27 PM > To: William Allen Simpson > Cc: nfs-ganesha-devel@lists.sourceforge.net > Subject: Re: [Nfs-ganesha-devel] Unbounded memory allocations (base

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-02 Thread Dominique Martinet
William Allen Simpson wrote on Tue, Mar 01, 2016 at 08:52:42PM -0500: > On 3/1/16 4:18 PM, Dominique Martinet wrote: > >Anyway, I'm a bit at lost right now, will go see you again when I'm back > >on this. Looks like I was just hitting issues with the xdr_bitmap4 code, because that's the only part

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-01 Thread William Allen Simpson
On 3/1/16 4:18 PM, Dominique Martinet wrote: > Anyway, I'm a bit at lost right now, will go see you again when I'm back > on this. > This sounds like the problems I had debugging nTI-RPC duplex and some others. Matt had already done a re-write of the original functions, splitting them into decode,

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-01 Thread Dominique Martinet
Matt Benjamin wrote on Tue, Mar 01, 2016 at 01:22:33PM -0500: > As I understand it, various max values will be in use, depending on > the structure being decoded. The original ~0 probably should have > been a constant. Yeah but even if there are multiple maxes I'll still want to use a few constan

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-01 Thread Matt Benjamin
sday, March 1, 2016 9:00:14 AM > Subject: Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on > client data) > > On 2/29/16 6:12 PM, Dominique Martinet wrote: > > @@ -4070,7 +4069,7 @@ extern "C" { > >

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-03-01 Thread William Allen Simpson
On 2/29/16 6:12 PM, Dominique Martinet wrote: > @@ -4070,7 +4069,7 @@ extern "C" { > return false; > if (!xdr_array > (xdrs, (char **)&objp->na41_aces.na41_aces_val, > -(u_int *) &objp->na41_aces.na41_aces_len, ~0, >

Re: [Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-02-29 Thread Matt Benjamin
yes, thanks for this effort matt - Original Message - > From: "Dominique Martinet" > To: "nfs-ganesha-devel" > Sent: Monday, February 29, 2016 6:12:49 PM > Subject: [Nfs-ganesha-devel] Unbounded memory allocations (based on client > data) &

[Nfs-ganesha-devel] Unbounded memory allocations (based on client data)

2016-02-29 Thread Dominique Martinet
Hi, Synopsis (coverity and codenomicon) folks have been fuzzing us a bit and found that we blindly trust the client and allocate huge buffers, e.g. send us some small string but pretending it's 0x length. I've found alot of these in include/nfsv41.h, what I've done so far is: - every xdr