]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
cifs: fix bad buffer length check in coalesce_t2
authorJeff Layton <jlayton@redhat.com>
Sun, 1 Jan 2012 15:34:39 +0000 (10:34 -0500)
committerSteve French <smfrench@gmail.com>
Wed, 4 Jan 2012 02:34:17 +0000 (20:34 -0600)
commit497728e11a9deeaea18be19fadcf7f1c85efbcf7
tree426b57623483588f7bdc15dc01cbd0930949fac1
parentf9fab10bbd768b0e5254e53a4a8477a94bfc4b96
cifs: fix bad buffer length check in coalesce_t2

The current check looks to see if the RFC1002 length is larger than
CIFSMaxBufSize, and fails if it is. The buffer is actually larger than
that by MAX_CIFS_HDR_SIZE.

This bug has been around for a long time, but the fact that we used to
cap the clients MaxBufferSize at the same level as the server tended
to paper over it. Commit c974befa changed that however and caused this
bug to bite in more cases.

Reported-and-Tested-by: Konstantinos Skarlatos <k.skarlatos@gmail.com>
Tested-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/connect.c