summaryrefslogtreecommitdiffstats
path: root/fs/smb/server/smb2pdu.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
commit3a4516e9d4e52a1e1c49f9c269b6e702ef586047 (patch)
tree0e12fabd3a7d77e4d0bb956b670df8a1062abf7e /fs/smb/server/smb2pdu.c
parentReleasing progress-linux version 6.1.85-1progress7u1. (diff)
downloadlinux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.tar.xz
linux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.zip
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/smb/server/smb2pdu.c')
-rw-r--r--fs/smb/server/smb2pdu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index c02b1772c..34d884254 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -534,6 +534,10 @@ int smb2_allocate_rsp_buf(struct ksmbd_work *work)
if (cmd == SMB2_QUERY_INFO_HE) {
struct smb2_query_info_req *req;
+ if (get_rfc1002_len(work->request_buf) <
+ offsetof(struct smb2_query_info_req, OutputBufferLength))
+ return -EINVAL;
+
req = smb2_get_msg(work->request_buf);
if ((req->InfoType == SMB2_O_INFO_FILE &&
(req->FileInfoClass == FILE_FULL_EA_INFORMATION ||