linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: CIFS <linux-cifs@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Namjae Jeon <linkinjeon@kernel.org>
Subject: Re: [GIT PULL] ksmbd server security fixes
Date: Mon, 20 Sep 2021 21:16:16 -0500	[thread overview]
Message-ID: <CAH2r5ms0P9r6N_Tqw02TtpmHXaiJejdQgL2Rur1GMP=tyr0CMg@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wi6_m_d88kx7wWYQS+waEk6hv5szwFYvy2PjP1naj87Hw@mail.gmail.com>

On Mon, Sep 20, 2021 at 5:46 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Sun, Sep 19, 2021 at 7:22 AM Steve French <smfrench@gmail.com> wrote:
> >
> > 3 ksmbd fixes: including an important security fix for path
> > processing, and a missing buffer overflow check, and a trivial fix for
> > incorrect header inclusion
> >
> > There are three additional patches (and also a patch to improve
> > symlink checks) for other buffer overflow cases that are being
> > reviewed and tested.
>
> Note that if you are working on a path basis, you should really take a
> look at our vfs lookup_flags, and LOOKUP_BENEATH in particular.

This was also something that Ralph brought up, and Namjae is looking
at now.

> The way to deal with '..' and symlinks is not to try to figure it out
> yourself. You'll get it wrong, partly because the races with rename
> are quite interesting. The VFS layer knows how to limit pathname
> lookup to the particular directory you started in these days.
>
> Of course, that is only true for the actual path lookup functions.
> Once you start doing things manually one component at a time yourself,
> you're on your own.

Agreed.  Also FYI I removed the "ksmbd: Use LOOKUP_NO_SYMLINKS"
changeset from for-next (I left the first two buffer validation changesets
in, since those have been reviewed), since Namjae is working on
an updated version following your suggestion (and others' review feedback).

-- 
Thanks,

Steve

  reply	other threads:[~2021-09-21  3:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 14:22 [GIT PULL] ksmbd server security fixes Steve French
2021-09-20 22:45 ` Linus Torvalds
2021-09-21  2:16   ` Steve French [this message]
2021-09-20 23:32 ` pr-tracker-bot
2021-09-23  2:47 ` Kees Cook
2021-09-23  3:20   ` Steve French
2021-09-23 15:42     ` Jeremy Allison
2021-09-23 18:21     ` Kees Cook
2021-09-23 11:13   ` ronnie sahlberg
2021-10-02  4:14 Steve French
2021-10-03  0:52 ` pr-tracker-bot

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='CAH2r5ms0P9r6N_Tqw02TtpmHXaiJejdQgL2Rur1GMP=tyr0CMg@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).