smb311: correct incorrect offset field in compression header
authorSteve French <stfrench@microsoft.com>
Tue, 19 Mar 2024 20:59:38 +0000 (15:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2024 14:22:51 +0000 (16:22 +0200)
[ Upstream commit 68c5818a27afcb5cdddab041b82e9d47c996cb6a ]

The offset field in the compression header is 32 bits not 16.

Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Reported-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/common/smb2pdu.h

index 61c6e72ccddc49ed612aaf8a0d1c3696b1be7933..735614d233a06af6fd459f1b4df90e05ec86bbaa 100644 (file)
@@ -227,7 +227,7 @@ struct smb2_compression_hdr {
        __le32 OriginalCompressedSegmentSize;
        __le16 CompressionAlgorithm;
        __le16 Flags;
-       __le16 Offset; /* this is the size of the uncompressed SMB2 header below */
+       __le32 Offset; /* this is the size of the uncompressed SMB2 header below */
        /* uncompressed SMB2 header (READ or WRITE) goes here */
        /* compressed data goes here */
 } __packed;