summaryrefslogtreecommitdiffstats
path: root/fs/smb/server/smb2pdu.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:19 +0000
commit68b7faa497774b94377d3a8215d917bd006eae0b (patch)
treebab1434b47a284ca2893dcc0b908d1b95d982e7c /fs/smb/server/smb2pdu.c
parentAdding upstream version 6.1.85. (diff)
downloadlinux-614d31e354eb89bbf52725f87444ba3a81bcbdc9.tar.xz
linux-614d31e354eb89bbf52725f87444ba3a81bcbdc9.zip
Adding upstream version 6.1.90.upstream/6.1.90upstream
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 ||