]> git.hungrycats.org Git - linux/commit
smb: client: fix OOB in receive_encrypted_standard()
authorPaulo Alcantara <pc@manguebit.com>
Sun, 11 Feb 2024 20:53:11 +0000 (02:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:21:42 +0000 (13:21 +0100)
commit858e73ff25639a0cc1f6f8d2587b62c045867e41
treeddb665001827363e1bdaf21da41bed21c3024305
parent6e5e93fd51fea74844cb741af15fdc359ea8712e
smb: client: fix OOB in receive_encrypted_standard()

[ Upstream commit eec04ea119691e65227a97ce53c0da6b9b74b0b7 ]

Fix potential OOB in receive_encrypted_standard() if server returned a
large shdr->NextCommand that would end up writing off the end of
@next_buffer.

Fixes: b24df3e30cbf ("cifs: update receive_encrypted_standard to handle compounded responses")
Cc: stable@vger.kernel.org
Reported-by: Robert Morris <rtm@csail.mit.edu>
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
[Guru: receive_encrypted_standard() is present in file smb2ops.c,
smb2ops.c file location is changed, modified patch accordingly.]
Signed-off-by: Guruswamy Basavaiah <guruswamy.basavaiah@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c