Patch "smb: client: fix parsing of SMB3.1.1 POSIX create context" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    smb: client: fix parsing of SMB3.1.1 POSIX create context

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     smb-client-fix-parsing-of-smb3.1.1-posix-create-context.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From stable+bounces-19418-greg=kroah.com@xxxxxxxxxxxxxxx Sat Feb 10 21:15:14 2024
From: Guruswamy Basavaiah <guruswamy.basavaiah@xxxxxxxxxxxx>
Date: Sun, 11 Feb 2024 01:44:44 +0530
Subject: smb: client: fix parsing of SMB3.1.1 POSIX create context
To: stable@xxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx
Cc: ajay.kaher@xxxxxxxxxxxx, tapas.kundu@xxxxxxxxxxxx, Guruswamy Basavaiah <guruswamy.basavaiah@xxxxxxxxxxxx>, Paulo Alcantara <pc@xxxxxxxxxxxxx>, Steve French <stfrench@xxxxxxxxxxxxx>
Message-ID: <20240210201445.3089482-3-guruswamy.basavaiah@xxxxxxxxxxxx>

From: Paulo Alcantara <pc@xxxxxxxxxxxxx>

[ Upstream commit 76025cc2285d9ede3d717fe4305d66f8be2d9346 ]

The data offset for the SMB3.1.1 POSIX create context will always be
8-byte aligned so having the check 'noff + nlen >= doff' in
smb2_parse_contexts() is wrong as it will lead to -EINVAL because noff
+ nlen == doff.

Fix the sanity check to correctly handle aligned create context data.

Fixes: af1689a9b770 ("smb: client: fix potential OOBs in smb2_parse_contexts()")
Signed-off-by: Paulo Alcantara <pc@xxxxxxxxxxxxx>
Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
[Guru:smb2_parse_contexts()  is present in file smb2ops.c,
smb2ops.c file location is changed, modified patch accordingly.]
Signed-off-by: Guruswamy Basavaiah <guruswamy.basavaiah@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/cifs/smb2pdu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -2030,7 +2030,7 @@ int smb2_parse_contexts(struct TCP_Serve
 
 		noff = le16_to_cpu(cc->NameOffset);
 		nlen = le16_to_cpu(cc->NameLength);
-		if (noff + nlen >= doff)
+		if (noff + nlen > doff)
 			return -EINVAL;
 
 		name = (char *)cc + noff;


Patches currently in stable-queue which might be from kroah.com@xxxxxxxxxxxxxxx are

queue-5.10/smb-client-fix-potential-oobs-in-smb2_parse_contexts.patch
queue-5.10/smb-client-fix-parsing-of-smb3.1.1-posix-create-context.patch
queue-5.10/smb-client-fix-oob-in-receive_encrypted_standard.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux