]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
CIFS: Fix a possible invalid memory access in smb2_query_symlink()
authorPavel Shilovsky <pshilovsky@samba.org>
Sun, 24 Jul 2016 07:37:38 +0000 (10:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:10:55 +0000 (18:10 +0200)
commit905e4841d9830fff4168d538c94148607100669d
tree4c3b29d21ba1219bed4cb11815ad968ab499e422
parentc341cdf5bf40e630d4f1fb01fdf5c8ccdf769f8d
CIFS: Fix a possible invalid memory access in smb2_query_symlink()

commit 7893242e2465aea6f2cbc2639da8fa5ce96e8cc2 upstream.

During following a symbolic link we received err_buf from SMB2_open().
While the validity of SMB2 error response is checked previously
in smb2_check_message() a symbolic link payload is not checked at all.
Fix it by adding such checks.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c