All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Pan Bian <bianpan2016@163.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] namei: free new_dentry late
Date: Sat, 24 Nov 2018 19:51:17 +0000	[thread overview]
Message-ID: <20181124195117.GB2217@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1543051404-42498-1-git-send-email-bianpan2016@163.com>

On Sat, Nov 24, 2018 at 05:23:24PM +0800, Pan Bian wrote:
> After calling dput(new_dentry), new_dentry is passed to fsnotify_move.
> This may result in a use-after-free bug. This patch moves the put
> operation late.
>
> Fixes: 49d31c2f389a("dentry name snapshots")

What does that commit have to do with anything?  The broken part is
                        fsnotify_move(new_dir, old_dir, old_dentry->d_name.name,
                                      new_is_dir, NULL, new_dentry);
and it predates that commit by 3 years - it came from da1ce0670c14 ("vfs: add
cross-rename")...

  reply	other threads:[~2018-11-25  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-24  9:23 [PATCH] namei: free new_dentry late Pan Bian
2018-11-24 19:51 ` Al Viro [this message]
2018-11-25  0:11   ` PanBian

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=20181124195117.GB2217@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=bianpan2016@163.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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.