mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Brennan <stephen.s.brennan@oracle.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] namei: fix use-after-free and adjust calling conventions
Date: Tue, 07 Sep 2021 14:44:51 -0700	[thread overview]
Message-ID: <87r1e0rrfw.fsf@stepbren-lnx.us.oracle.com> (raw)
In-Reply-To: <20210907205043.16768-1-stephen.s.brennan@oracle.com>

Stephen Brennan <stephen.s.brennan@oracle.com> writes:
> Drawing from the comments on the last two patches from me and Dmitry,
> the concensus is that __filename_parentat() is inherently buggy, and
> should be removed. But there's some nice consistency to the way that
> the other functions (filename_create, filename_lookup) are named which
> would get broken.
>
> I looked at the callers of filename_create and filename_lookup. All are
> small functions which are trivial to modify to include a putname(). It
> seems to me that adding a few more lines to these functions is a good
> traedoff for better clarity on lifetimes (as it's uncommon for functions
> to drop references to their parameters) and better consistency.
>
> This small series combines the UAF fix from me, and the removal of
> __filename_parentat() from Dmitry as patch 1. Then I standardize
> filename_create() and filename_lookup() and their callers.
>
> v2: Fix double getname in user_path_create()
>
> Stephen Brennan (3):
>   namei: Fix use after free in kern_path_locked
>   namei: Standardize callers of filename_lookup()
>   namei: Standardize callers of filename_create()

Please ignore this! I missed some feedback from Al and will send a v3.

>
>  fs/fs_parser.c |   1 -
>  fs/namei.c     | 126 ++++++++++++++++++++++++++-----------------------
>  2 files changed, 66 insertions(+), 61 deletions(-)
>
> -- 
> 2.30.2

      parent reply	other threads:[~2021-09-07 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 20:50 Stephen Brennan
2021-09-07 20:50 ` [PATCH v2 1/3] namei: Fix use after free in kern_path_locked Stephen Brennan
2021-09-07 20:50 ` [PATCH v2 2/3] namei: Standardize callers of filename_lookup() Stephen Brennan
2021-09-07 20:50 ` [PATCH v2 3/3] namei: Standardize callers of filename_create() Stephen Brennan
2021-09-07 21:44 ` Stephen Brennan [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=87r1e0rrfw.fsf@stepbren-lnx.us.oracle.com \
    --to=stephen.s.brennan@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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®