]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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)
committerKamal Mostafa <kamal@canonical.com>
Mon, 22 Aug 2016 14:42:29 +0000 (07:42 -0700)
commitfb7e3cfdfc643ec26d0b6f57281ca2728dcf362b
tree3a8a99c32952f3aa16b0ed0c6dbb114a77e622c5
parent37594b6cfe65e9ab2e0645e41b720b319165f5a6
CIFS: Fix a possible invalid memory access in smb2_query_symlink()

BugLink: http://bugs.launchpad.net/bugs/1615620
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
fs/cifs/smb2ops.c