All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kadashev <dkadashev@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jens Axboe <axboe@kernel.dk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] namei: Fix use after free in kern_path_locked
Date: Wed, 1 Sep 2021 21:47:12 +0700	[thread overview]
Message-ID: <CAOKbgA44BW824W_OqL8LO1FcaWdomrsYsr-kMHSj3cV1daJ4fg@mail.gmail.com> (raw)
In-Reply-To: <YS9D4AlEsaCxLFV0@infradead.org>

On Wed, Sep 1, 2021 at 4:13 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Wed, Sep 01, 2021 at 02:35:08PM +0700, Dmitry Kadashev wrote:
> > Ouch. Thanks for taking care of this, Stephen. I guess
> > filename_parentat() should be killed, since kern_path_locked() was the
> > only place it's used in and it always results in danging "last",
> > provoking bugs just like this one. I can send a patch on top of this if
> > you prefer.
>
> Yes.  And then rename __filename_parentat to filename_parentat, please.

I see why you want it to be renamed - and I'll send the patch.  The only
problem I have with the rename is with __filename_parentat() there is a
nice uniformity: filename_* functions consume the passed name, and
__filename_* do not. So maybe it's something nice to have. Maybe not.

Anyway, as I've mentioned, I'll send the patch and it can be either
picked up or ignored.

-- 
Dmitry

      reply	other threads:[~2021-09-01 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  0:13 [PATCH] namei: Fix use after free in kern_path_locked Stephen Brennan
2021-09-01  7:35 ` Dmitry Kadashev
2021-09-01  9:12   ` Christoph Hellwig
2021-09-01 14:47     ` Dmitry Kadashev [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=CAOKbgA44BW824W_OqL8LO1FcaWdomrsYsr-kMHSj3cV1daJ4fg@mail.gmail.com \
    --to=dkadashev@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephen.s.brennan@oracle.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.