• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisionaaf1e07ac554b9674bf22394911ec8dd3a927826 (tree)
Zeit2006-05-08 04:11:33
AutorOlaf Kirch <okir@suse...>
CommiterWilly TARREAU

Log Message

[PATCH] smbfs chroot issue (CVE-2006-1864)

Mark Moseley reported that a chroot environment on a SMB share can be
left via "cd ..\\". Similar to CVE-2006-1863 issue with cifs, this fix
is for smbfs.

Steven French <sfrench@us.ibm.com> wrote:

Looks fine to me. This should catch the slash on lookup or equivalent,
which will be all obvious paths of interest.

Back-ported to 2.4 by Willy Tarreau.
Signed-off-by: Willy Tarreau <willy@w.ods.org>

Ändern Zusammenfassung

Diff

--- a/fs/smbfs/dir.c
+++ b/fs/smbfs/dir.c
@@ -416,6 +416,11 @@ smb_lookup(struct inode *dir, struct dentry *dentry)
416416 if (dentry->d_name.len > SMB_MAXNAMELEN)
417417 goto out;
418418
419+ /* Do not allow lookup of names with backslashes in */
420+ error = -EINVAL;
421+ if (memchr(dentry->d_name.name, '\\', dentry->d_name.len))
422+ goto out;
423+
419424 error = smb_proc_getattr(dentry, &finfo);
420425 #ifdef SMBFS_PARANOIA
421426 if (error && error != -ENOENT)
Show on old repository browser