| 1 |
dsd |
459 |
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c
|
| 2 |
|
|
index 0424d06..45862ec 100644
|
| 3 |
|
|
--- a/fs/smbfs/dir.c
|
| 4 |
|
|
+++ b/fs/smbfs/dir.c
|
| 5 |
|
|
@@ -434,6 +434,11 @@ smb_lookup(struct inode *dir, struct den
|
| 6 |
|
|
if (dentry->d_name.len > SMB_MAXNAMELEN)
|
| 7 |
|
|
goto out;
|
| 8 |
|
|
|
| 9 |
|
|
+ /* Do not allow lookup of names with backslashes in */
|
| 10 |
|
|
+ error = -EINVAL;
|
| 11 |
|
|
+ if (memchr(dentry->d_name.name, '\\', dentry->d_name.len))
|
| 12 |
|
|
+ goto out;
|
| 13 |
|
|
+
|
| 14 |
|
|
lock_kernel();
|
| 15 |
|
|
error = smb_proc_getattr(dentry, &finfo);
|
| 16 |
|
|
#ifdef SMBFS_PARANOIA
|