mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ksmbd: no response from compound read
[ Upstream commit e202a1e863
]
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@trendmicro.com # ZDI-CAN-21587, ZDI-CAN-21588
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
82373d1b76
commit
d424c636b7
1 changed files with 6 additions and 1 deletions
|
@ -6245,7 +6245,7 @@ int smb2_read(struct ksmbd_work *work)
|
|||
struct ksmbd_conn *conn = work->conn;
|
||||
struct smb2_read_req *req;
|
||||
struct smb2_read_rsp *rsp, *rsp_org;
|
||||
struct ksmbd_file *fp;
|
||||
struct ksmbd_file *fp = NULL;
|
||||
loff_t offset;
|
||||
size_t length, mincount;
|
||||
ssize_t nbytes = 0, remain_bytes = 0;
|
||||
|
@ -6253,6 +6253,11 @@ int smb2_read(struct ksmbd_work *work)
|
|||
|
||||
rsp_org = work->response_buf;
|
||||
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)) {
|
||||
|
|
Loading…
Reference in a new issue