Re: Fw: Buffer overflow in CIFS VFS.

2007-11-10 Thread Przemyslaw Wegrzyn
Steve French wrote: > On Nov 10, 2007 7:03 AM, Przemyslaw Wegrzyn <[EMAIL PROTECTED]> wrote: > >> Steve French wrote: >> >>> That might be better, although without memory pools, this would perform >>> much worse >>> >>> >> Why ? I don't get your point here. >> > What I meant is

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-10 Thread Steve French
On Nov 10, 2007 7:03 AM, Przemyslaw Wegrzyn <[EMAIL PROTECTED]> wrote: > Steve French wrote: > > That might be better, although without memory pools, this would perform > > much worse > > > Why ? I don't get your point here. > > Przemyslaw > What I meant is that two fixed size memory pools rather

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-10 Thread Przemyslaw Wegrzyn
Steve French wrote: > below. The obvious need is to create an SendReceive-NoResponse (or > equivalent) which > frees the SMB request buffer after send, and does not copy into an smb > response buffer. The following functions need to be changed to use > How about modifying SendReceive to behav

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-09 Thread Steve French
I have done an analysis of the SMB functions (56 callers of SendReceive, 4 of SendReceive2 and 2 callers of SendReceiveBlockingLock) and found additional changes which should help performance, by reducing the number of expensive large buffer allocations and also by freeing buffers back to the pool

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-09 Thread J. Bruce Fields
On Fri, Nov 09, 2007 at 11:59:46AM +0100, Przemyslaw Wegrzyn wrote: > Steve French wrote: > > You are correct that the CIFS code calls SendReceive in cases in which > > the buffer may be too small to fit a large SMB response, and that > > should be fixed (e.g. to avoid possible overflows due to a s

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-09 Thread Przemyslaw Wegrzyn
Steve French wrote: > You are correct that the CIFS code calls SendReceive in cases in which > the buffer may be too small to fit a large SMB response, and that > should be fixed (e.g. to avoid possible overflows due to a server > bug), None of the eight cases (SMB TreeDisconnect, SMB uLogoff, SMB

Re: Fw: Buffer overflow in CIFS VFS.

2007-11-08 Thread Steve French
You are correct that the CIFS code calls SendReceive in cases in which the buffer may be too small to fit a large SMB response, and that should be fixed (e.g. to avoid possible overflows due to a server bug), None of the eight cases (SMB TreeDisconnect, SMB uLogoff, SMB Close, SMB FindClose etc.) i