]> git.baikalelectronics.ru Git - kernel.git/commit
send channel sequence number in SMB3 requests after reconnects
authorSteve French <stfrench@microsoft.com>
Fri, 25 Aug 2023 04:29:18 +0000 (23:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:27:56 +0000 (12:27 +0200)
commit0f7339056893f270e391c23d2438871a79deec86
treeaac63c14e00eda93ec52d201cb34c922e1f3fa17
parent22ec50d7b524183513721fdf05a5c20fa6656639
send channel sequence number in SMB3 requests after reconnects

commit 09ee7a3bf866c0fa5ee1914d2c65958559eb5b4c upstream.

The ChannelSequence field in the SMB3 header is supposed to be
increased after reconnect to allow the server to distinguish
requests from before and after the reconnect.  We had always
been setting it to zero.  There are cases where incrementing
ChannelSequence on requests after network reconnects can reduce
the chance of data corruptions.

See MS-SMB2 3.2.4.1 and 3.2.7.1

Signed-off-by: Steve French <stfrench@microsoft.com>
Cc: stable@vger.kernel.org # 5.16+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/cifsglob.h
fs/smb/client/connect.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c
fs/smb/common/smb2pdu.h