From: Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
To: Ryusuke Konishi
<konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-nilfs <linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Jiacheng Xu <stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org>,
Mudong Liang
<mudongliangabcd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] nilfs2: fix use-after-free bug in nilfs_mdt_destroy()
Date: Tue, 16 Aug 2022 00:04:19 +0100 [thread overview]
Message-ID: <YvrQ8xO9Lx7rdKq8@ZenIV> (raw)
In-Reply-To: <CAKFNMomyjXpsz-=BtG+G3q1J7CFUBMEfP13FfxwhWB==9qb++w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, Aug 16, 2022 at 05:34:12AM +0900, Ryusuke Konishi wrote:
> Yes, I agree it's better if security_inode_alloc() is moved to the end as
> possible in the sense of avoiding similar issues.
> But, would that vfs change be safe to backport to stable trees?
Yes.
> It looks like the error handling for security_inode_alloc() is in the
> middle of inode_init_always() for a very long time..
Look at the initializations done after it. The only thing with effects
outside of inode itself is (since 2010) an increment of nr_inodes.
> If you want to see the impact of the vfs change, I think it's one way
> to apply this one in advance. Or if you want to fix it in one step,
> I think it's good too. How do you feel about this ?
IMO that should go into inode_init_always(), with Cc:stable. If you
(or Dongliang Mu, or anybody else) would post such variant with
reasonable commit message, I'll pick it into vfs.git and feed to Linus
in the next window. E.g. into #work.inode, with that branch being
made never-rebased, so that you could pull it into your development
branch as soon as it's there...
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@zeniv.linux.org.uk>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-nilfs <linux-nilfs@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Jiacheng Xu <stitch@zju.edu.cn>,
Mudong Liang <mudongliangabcd@gmail.com>
Subject: Re: [PATCH] nilfs2: fix use-after-free bug in nilfs_mdt_destroy()
Date: Tue, 16 Aug 2022 00:04:19 +0100 [thread overview]
Message-ID: <YvrQ8xO9Lx7rdKq8@ZenIV> (raw)
In-Reply-To: <CAKFNMomyjXpsz-=BtG+G3q1J7CFUBMEfP13FfxwhWB==9qb++w@mail.gmail.com>
On Tue, Aug 16, 2022 at 05:34:12AM +0900, Ryusuke Konishi wrote:
> Yes, I agree it's better if security_inode_alloc() is moved to the end as
> possible in the sense of avoiding similar issues.
> But, would that vfs change be safe to backport to stable trees?
Yes.
> It looks like the error handling for security_inode_alloc() is in the
> middle of inode_init_always() for a very long time..
Look at the initializations done after it. The only thing with effects
outside of inode itself is (since 2010) an increment of nr_inodes.
> If you want to see the impact of the vfs change, I think it's one way
> to apply this one in advance. Or if you want to fix it in one step,
> I think it's good too. How do you feel about this ?
IMO that should go into inode_init_always(), with Cc:stable. If you
(or Dongliang Mu, or anybody else) would post such variant with
reasonable commit message, I'll pick it into vfs.git and feed to Linus
in the next window. E.g. into #work.inode, with that branch being
made never-rebased, so that you could pull it into your development
branch as soon as it's there...
next prev parent reply other threads:[~2022-08-15 23:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 17:51 [PATCH] nilfs2: fix use-after-free bug in nilfs_mdt_destroy() Ryusuke Konishi
2022-08-15 17:51 ` Ryusuke Konishi
[not found] ` <20220815175114.23576-1-konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-08-15 18:27 ` Al Viro
2022-08-15 18:27 ` Al Viro
2022-08-15 20:34 ` Ryusuke Konishi
2022-08-15 20:34 ` Ryusuke Konishi
[not found] ` <CAKFNMomyjXpsz-=BtG+G3q1J7CFUBMEfP13FfxwhWB==9qb++w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-15 23:04 ` Al Viro [this message]
2022-08-15 23:04 ` Al Viro
2022-08-16 3:11 ` Ryusuke Konishi
2022-08-16 3:11 ` Ryusuke Konishi
[not found] ` <CAKFNMoniwM5x0w03cezGTFDWt=apNmGWpur83+vjghg3zcawpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-16 3:24 ` Dongliang Mu
2022-08-16 3:24 ` Dongliang Mu
[not found] ` <CAD-N9QW5-kVR85t1canTqrF9RMkOjC1Z2q8BSQKxLwaay97Mgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-16 9:18 ` Ryusuke Konishi
2022-08-16 9:18 ` Ryusuke Konishi
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=YvrQ8xO9Lx7rdKq8@ZenIV \
--to=viro-rmsdqhl/ynmifsdqtta3olvcufugdwfn@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mudongliangabcd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.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.