From: Chris Wright <chrisw@sous-sol.org>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
Greg KH <greg@kroah.com>, Steven French <sfrench@us.ibm.com>,
Marcel Holtmann <holtmann@redhat.com>, Olaf Kirch <okir@suse.de>,
Mark Moseley <moseleymark@gmail.com>,
shaggy@austin.ibm.com
Subject: [PATCH] smbfs chroot issue (CVE-2006-1864)
Date: Thu, 4 May 2006 18:40:41 -0700 [thread overview]
Message-ID: <20060505014041.GZ24291@moss.sous-sol.org> (raw)
From: Olaf Kirch <okir@suse.de>
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.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
This fix is in -stable, but doesn't appear to be in your tree yet.
fs/smbfs/dir.c | 5 +++++
1 file changed, 5 insertions(+)
--- linus-2.6.orig/fs/smbfs/dir.c
+++ linus-2.6/fs/smbfs/dir.c
@@ -434,6 +434,11 @@ smb_lookup(struct inode *dir, struct den
if (dentry->d_name.len > SMB_MAXNAMELEN)
goto out;
+ /* Do not allow lookup of names with backslashes in */
+ error = -EINVAL;
+ if (memchr(dentry->d_name.name, '\\', dentry->d_name.len))
+ goto out;
+
lock_kernel();
error = smb_proc_getattr(dentry, &finfo);
#ifdef SMBFS_PARANOIA
next reply other threads:[~2006-05-05 1:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 1:40 Chris Wright [this message]
2006-05-05 5:37 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060505014041.GZ24291@moss.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=greg@kroah.com \
--cc=holtmann@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moseleymark@gmail.com \
--cc=okir@suse.de \
--cc=sfrench@us.ibm.com \
--cc=shaggy@austin.ibm.com \
--cc=stable@kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®