cifs: integer overflow in in SMB2_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 10 Sep 2018 11:12:07 +0000 (14:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Dec 2018 12:39:08 +0000 (13:39 +0100)
commit3845c73607ae8de8c7b60d701cdecdc5505c821d
tree688f084b07356b2199a2ae3f7e64cc79836a78ab
parent0d9b51366d2da5dc5537c1c6e856cf4c0d08de0e
cifs: integer overflow in in SMB2_ioctl()

commit 2d204ee9d671327915260071c19350d84344e096 upstream

The "le32_to_cpu(rsp->OutputOffset) + *plen" addition can overflow and
wrap around to a smaller value which looks like it would lead to an
information leak.

Fixes: 4a72dafa19ba ("SMB2 FSCTL and IOCTL worker function")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/smb2pdu.c