summaryrefslogtreecommitdiff
path: root/fs/smb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-02 21:04:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-02 21:04:28 -0700
commitd8a9a4b11a137909e306e50346148fc5c3b63f9d (patch)
tree5b02536cdfb8743d8642e43710f3de99a4bff213 /fs/smb
parent7b9e74c5a49e1331e03c8ae5f981067da4f33328 (diff)
parent78ec5bf2f589ec7fd8f169394bfeca541b077317 (diff)
Merge tag 'v7.0-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fix from Steve French: - Fix potential out of bounds read in mount * tag 'v7.0-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath
Diffstat (limited to 'fs/smb')
-rw-r--r--fs/smb/client/fs_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index a4a7c7eee038..a46764c24710 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -588,6 +588,10 @@ char *cifs_sanitize_prepath(char *prepath, gfp_t gfp)
while (IS_DELIM(*cursor1))
cursor1++;
+ /* exit in case of only delimiters */
+ if (!*cursor1)
+ return NULL;
+
/* copy the first letter */
*cursor2 = *cursor1;