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)
committerSteve French <smfrench@gmail.com>
Thu, 28 Jul 2016 03:55:56 +0000 (22:55 -0500)
commit7893242e2465aea6f2cbc2639da8fa5ce96e8cc2
tree1cab64729128945784e3e72ac5796a1671187eb7
parenta6b5058fafdf508904bbf16c29b24042cef3c496
CIFS: Fix a possible invalid memory access in smb2_query_symlink()

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>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/smb2ops.c