All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Ralph Boehme <slow@samba.org>
Subject: Re: [PATCH v4] ksmbd: use LOOKUP_BENEATH to prevent the out of share access
Date: Sat, 25 Sep 2021 12:45:02 -0500	[thread overview]
Message-ID: <CAH2r5mvkQYahmG5Yz3356eEztKP_BS=wu7uMLG7v3UR1+xdxjw@mail.gmail.com> (raw)
In-Reply-To: <CAKYAXd-XqKdgYSsQKJmDDjUyzqQcGfSjd5uJth3mnsRkAWjOjw@mail.gmail.com>

I tested this as well with some simple examples trying to escape the
share - testing going fine so far.

Also ran the buildbot from current linux next on client to current
linux next for ksmbd (and it passed)

http://smb3-test-rhel-75.southcentralus.cloudapp.azure.com/#/builders/8/builds/73

On Fri, Sep 24, 2021 at 7:43 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
>
> 2021-09-25 0:06 GMT+09:00, Hyunchul Lee <hyc.lee@gmail.com>:
> > instead of removing '..' in a given path, call
> > kern_path with LOOKUP_BENEATH flag to prevent
> > the out of share access.
> >
> > ran various test on this:
> > smb2-cat-async smb://127.0.0.1/homes/../out_of_share
> > smb2-cat-async smb://127.0.0.1/homes/foo/../../out_of_share
> > smbclient //127.0.0.1/homes -c "mkdir ../foo2"
> > smbclient //127.0.0.1/homes -c "rename bar ../bar"
> >
> > Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> > Cc: Ralph Boehme <slow@samba.org>
> > Cc: Steve French <smfrench@gmail.com>
> > Cc: Namjae Jeon <linkinjeon@kernel.org>
> > Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
> Looks good to me!
> Acked-by: Namjae Jeon <linkinjeon@kernel.org>
>
> Thanks!



-- 
Thanks,

Steve

  reply	other threads:[~2021-09-25 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 15:06 [PATCH v4] ksmbd: use LOOKUP_BENEATH to prevent the out of share access Hyunchul Lee
2021-09-24 17:20 ` Jeremy Allison
2021-09-25  0:08   ` Namjae Jeon
2021-09-25  0:21     ` Namjae Jeon
2021-09-25  0:43 ` Namjae Jeon
2021-09-25 17:45   ` Steve French [this message]
2021-09-28 15:18 ` Tom Talpey
2021-09-29 12:40   ` Namjae Jeon
2021-09-29 15:01     ` Tom Talpey
2021-09-29 23:52       ` Namjae Jeon
2021-09-30  0:01   ` Hyunchul Lee

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='CAH2r5mvkQYahmG5Yz3356eEztKP_BS=wu7uMLG7v3UR1+xdxjw@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=slow@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.