diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-02 14:56:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-02 14:56:14 +0200 |
commit | 9e6a90790357e8b468445f5c549c498126cedefb (patch) | |
tree | 18aea6eef6b5017768ed9ffb4b3d582133c7a80f /fs/cifs/link.c | |
parent | 1e70d57e7285996bcf0a226eac8c5ba43a89f85d (diff) | |
parent | 672c0c5173427e6b3e2a9bbb7be51ceeec78093a (diff) |
Merge 5.18-rc5 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r-- | fs/cifs/link.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 852e54ee82c2..bbdf3281559c 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -85,6 +85,9 @@ parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len, if (rc != 1) return -EINVAL; + if (link_len > CIFS_MF_SYMLINK_LINK_MAXLEN) + return -EINVAL; + rc = symlink_hash(link_len, link_str, md5_hash); if (rc) { cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc); |