Skip to content

Commit e202a1e

Browse files
namjaejeonsmfrench
authored andcommitted
ksmbd: no response from compound read
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: [email protected] # ZDI-CAN-21587, ZDI-CAN-21588 Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3df0411 commit e202a1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/smb/server/smb2pdu.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6214,6 +6214,11 @@ int smb2_read(struct ksmbd_work *work)
62146214
unsigned int max_read_size = conn->vals->max_read_size;
62156215

62166216
WORK_BUFFERS(work, req, rsp);
6217+
if (work->next_smb2_rcv_hdr_off) {
6218+
work->send_no_response = 1;
6219+
err = -EOPNOTSUPP;
6220+
goto out;
6221+
}
62176222

62186223
if (test_share_config_flag(work->tcon->share_conf,
62196224
KSMBD_SHARE_FLAG_PIPE)) {

0 commit comments

Comments
 (0)