aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smb/server/server.c
diff options
context:
space:
mode:
authorLinus Torvalds <[email protected]>2024-04-22 23:28:31 +0000
committerLinus Torvalds <[email protected]>2024-04-22 23:28:31 +0000
commit71b1543c83d65af8215d7558d70fc2ecbee77dcf (patch)
tree6c743fde15dbe7fce201742b2e32fbcf5bccbae6 /fs/smb/server/server.c
parentMerge tag 'bcachefs-2024-04-22' of https://evilpiepirate.org/git/bcachefs (diff)
parentksmbd: add continuous availability share parameter (diff)
downloadkernel-71b1543c83d65af8215d7558d70fc2ecbee77dcf.tar.gz
kernel-71b1543c83d65af8215d7558d70fc2ecbee77dcf.zip
Merge tag '6.9-rc5-ksmbd-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French: "Five ksmbd server fixes, most also for stable: - rename fix - two fixes for potential out of bounds - fix for connections from MacOS (padding in close response) - fix for when to enable persistent handles" * tag '6.9-rc5-ksmbd-fixes' of git://git.samba.org/ksmbd: ksmbd: add continuous availability share parameter ksmbd: common: use struct_group_attr instead of struct_group for network_open_info ksmbd: clear RENAME_NOREPLACE before calling vfs_rename ksmbd: validate request buffer size in smb2_allocate_rsp_buf() ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf
Diffstat (limited to 'fs/smb/server/server.c')
-rw-r--r--fs/smb/server/server.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/smb/server/server.c b/fs/smb/server/server.c
index c0788188aa82..c67fbc8d6683 100644
--- a/fs/smb/server/server.c
+++ b/fs/smb/server/server.c
@@ -167,20 +167,17 @@ static void __handle_ksmbd_work(struct ksmbd_work *work,
int rc;
bool is_chained = false;
- if (conn->ops->allocate_rsp_buf(work))
- return;
-
if (conn->ops->is_transform_hdr &&
conn->ops->is_transform_hdr(work->request_buf)) {
rc = conn->ops->decrypt_req(work);
- if (rc < 0) {
- conn->ops->set_rsp_status(work, STATUS_DATA_ERROR);
- goto send;
- }
-
+ if (rc < 0)
+ return;
work->encrypted = true;
}
+ if (conn->ops->allocate_rsp_buf(work))
+ return;
+
rc = conn->ops->init_rsp_hdr(work);
if (rc) {
/* either uid or tid is not correct */