[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvrQ8xO9Lx7rdKq8@ZenIV>
Date: Tue, 16 Aug 2022 00:04:19 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Ryusuke Konishi <konishi.ryusuke@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-nilfs <linux-nilfs@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Jiacheng Xu <stitch@....edu.cn>,
Mudong Liang <mudongliangabcd@...il.com>
Subject: Re: [PATCH] nilfs2: fix use-after-free bug in nilfs_mdt_destroy()
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...
Powered by blists - more mailing lists