cifs: Fix potential OOB access of lock element array
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 8 Jan 2019 18:30:57 +0000 (18:30 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 11 Jan 2019 13:14:40 +0000 (07:14 -0600)
commitb9a74cde94957d82003fb9f7ab4777938ca851cd
treeccd9808334e6bc7ab6d53193aa7590f69de830ab
parent92a8109e4d3a34fb6b115c9098b51767dc933444
cifs: Fix potential OOB access of lock element array

If maxBuf is small but non-zero, it could result in a zero sized lock
element array which we would then try and access OOB.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/file.c
fs/cifs/smb2file.c