Patch "ksmbd: no response from compound read" has been added to the 6.1-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

    ksmbd: no response from compound read

to the 6.1-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:
     ksmbd-no-response-from-compound-read.patch
and it can be found in the queue-6.1 subdirectory.

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



commit e30621e106b44a79ad225cf64b1f345f0eb3e3f5
Author: Namjae Jeon <linkinjeon@xxxxxxxxxx>
Date:   Sun Jul 23 15:22:33 2023 +0900

    ksmbd: no response from compound read
    
    [ Upstream commit e202a1e8634b186da38cbbff85382ea2b9e297cf ]
    
    ksmbd doesn't support compound read. If client send read-read in
    compound to ksmbd, there can be memory leak from read buffer.
    Windows and linux clients doesn't send it to server yet. For now,
    No response from compound read. compound read will be supported soon.
    
    Reported-by: zdi-disclosures@xxxxxxxxxxxxxx # ZDI-CAN-21587, ZDI-CAN-21588
    Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 74c245809772e..f6fd5cf976a50 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -6314,6 +6314,11 @@ int smb2_read(struct ksmbd_work *work)
 	unsigned int max_read_size = conn->vals->max_read_size;
 
 	WORK_BUFFERS(work, req, rsp);
+	if (work->next_smb2_rcv_hdr_off) {
+		work->send_no_response = 1;
+		err = -EOPNOTSUPP;
+		goto out;
+	}
 
 	if (test_share_config_flag(work->tcon->share_conf,
 				   KSMBD_SHARE_FLAG_PIPE)) {



[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