diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 15:41:04 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 15:41:04 +0100 |
commit | 4ccdaba5ab560862f89d1d971fbcc2ef424e1867 (patch) | |
tree | a7931e13df9cc887017eaa143b4dac66de959d90 /fs/smb/client/misc.c | |
parent | 1cdc605c7d70a390ff75a814a26c6f45d75778be (diff) | |
parent | 861deac3b092f37b2c5e6871732f3e11486f7082 (diff) |
Merge tag 'v6.7-rc7' into gpio/for-next
Linux 6.7-rc7
Diffstat (limited to 'fs/smb/client/misc.c')
-rw-r--r-- | fs/smb/client/misc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/smb/client/misc.c b/fs/smb/client/misc.c index 35b176457bbe..c2137ea3c253 100644 --- a/fs/smb/client/misc.c +++ b/fs/smb/client/misc.c @@ -363,6 +363,10 @@ checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server) cifs_dbg(VFS, "Length less than smb header size\n"); } return -EIO; + } else if (total_read < sizeof(*smb) + 2 * smb->WordCount) { + cifs_dbg(VFS, "%s: can't read BCC due to invalid WordCount(%u)\n", + __func__, smb->WordCount); + return -EIO; } /* otherwise, there is enough to get to the BCC */ |