]> 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)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 22 Aug 2016 16:23:20 +0000 (12:23 -0400)
commit1eaac1744e078ea0218f9840e0a259f97fca7ea6
treea5e108896f016f54ec0066500c0a42734e584f9f
parenta10e07c73180c1d02b8899625e401b107a7c2cc5
CIFS: Fix a possible invalid memory access in smb2_query_symlink()

[ Upstream commit 7893242e2465aea6f2cbc2639da8fa5ce96e8cc2 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
fs/cifs/smb2ops.c