]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2019 08:44:23 +0000 (09:44 +0100)
commitac72ab69de6686c9a4d65f0e44f13cdfb6255086
tree9057afe37bd099072a83860a0e9490fd54514ab3
parentde92e4baf2b85bbd6e33d2b11966a76391fc30de
cifs: Fix potential OOB access of lock element array

commit b9a74cde94957d82003fb9f7ab4777938ca851cd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/file.c
fs/cifs/smb2file.c