summaryrefslogtreecommitdiff
path: root/rust/kernel/drm/gpuvm/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-07-08 19:27:10 +0800
committerSteve French <stfrench@microsoft.com>2026-07-08 10:10:38 -0500
commit027a84ac6b50c12ef767c15abfc58aa865820e9e (patch)
treeccdad5b2e33bae15fd98d3a981261ac9d0f76dcb /rust/kernel/drm/gpuvm/git@git.tavy.me:linux-stable.git
parent6d07e4f7144b636b112fbe177d32e1cf85e2558e (diff)
cifs: validate DFS referral string offsets
parse_dfs_referrals() validates that the response header and referral array fit in the received buffer, but each referral also contains string offsets supplied by the server. Those offsets are used to compute the DfsPath and NetworkAddress string pointers without checking whether they still point inside the response buffer. A malformed referral can therefore make the computed pointer exceed the end of the buffer. The resulting negative max_len is then passed to cifs_strndup_from_utf16(), and the non-Unicode path forwards it to kstrndup() as a size_t, allowing strnlen() to read out of bounds. Validate each string offset before deriving the string pointer. Fixes: 4ecce920e13a ("CIFS: move DFS response parsing out of SMB1 code") Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'rust/kernel/drm/gpuvm/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions