]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ksmbd: use ksmbd_req_buf_next() in ksmbd_verify_smb_message()
authorRalph Boehme <slow@samba.org>
Mon, 18 Dec 2023 15:32:21 +0000 (00:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:48 +0000 (10:41 +0100)
[ Upstream commit a088ac859f8124d491f02a19d080fc5ee4dbd202 ]

Use ksmbd_req_buf_next() in ksmbd_verify_smb_message().

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb_common.c

index af583e42662156164e8f3e9e324d503a7007fd5a..44dbc73d0d1cefeda4a36cb6d24a5b8c01a7d0fc 100644 (file)
@@ -134,7 +134,7 @@ int ksmbd_lookup_protocol_idx(char *str)
  */
 int ksmbd_verify_smb_message(struct ksmbd_work *work)
 {
-       struct smb2_hdr *smb2_hdr = work->request_buf + work->next_smb2_rcv_hdr_off;
+       struct smb2_hdr *smb2_hdr = ksmbd_req_buf_next(work);
        struct smb_hdr *hdr;
 
        if (smb2_hdr->ProtocolId == SMB2_PROTO_NUMBER)