cifs: prevent copying past input buffer boundaries
authorPaulo Alcantara <pc@cjr.nz>
Thu, 6 Oct 2022 16:04:05 +0000 (13:04 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 13 Oct 2022 14:36:39 +0000 (09:36 -0500)
commit9ee2afe5207b63b20426ee081f486d831bae871d
tree026ea3477fbfa06af3f8136bdb7aecc1f21dfed4
parent69ccafdd35cdffd72504bfed58dcaee5e73a88a7
cifs: prevent copying past input buffer boundaries

Prevent copying past @data buffer in smb2_validate_and_copy_iov() as
the output buffer in @iov might be potentially bigger and thus copying
more bytes than requested in @minbufsize.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c