mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: marcelo@kvack.org
Cc: linux-kernel@vger.kernel.org, Chris Wright <chrisw@sous-sol.org>,
	Steven French <sfrench@us.ibm.com>,
	Mark Moseley <moseleymark@gmail.com>
Subject: Re: [PATCH] smbfs chroot issue (CVE-2006-1864)
Date: Fri, 5 May 2006 07:37:18 +0200	[thread overview]
Message-ID: <20060505053718.GE11191@w.ods.org> (raw)
In-Reply-To: <20060505014041.GZ24291@moss.sous-sol.org>

Marcelo,

This patch also applies to 2.4, did you receive it on your side or do you
want me to queue it in -upstream ?

Regards,
Willy

On Thu, May 04, 2006 at 06:40:41PM -0700, Chris Wright wrote:
> 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
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2006-05-05  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05  1:40 Chris Wright
2006-05-05  5:37 ` Willy Tarreau [this message]

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=20060505053718.GE11191@w.ods.org \
    --to=willy@w.ods.org \
    --cc=chrisw@sous-sol.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@kvack.org \
    --cc=moseleymark@gmail.com \
    --cc=sfrench@us.ibm.com \
    /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®