lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230512164627.0cd2a6f5d6a61bf736715c32@linux-foundation.org>
Date:   Fri, 12 May 2023 16:46:27 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Ryusuke Konishi <konishi.ryusuke@...il.com>,
        linux-nilfs@...r.kernel.org,
        syzbot <syzbot+78d4495558999f55d1da@...kaller.appspotmail.com>,
        syzkaller-bugs@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nilfs2: fix use-after-free bug of nilfs_root in
 nilfs_evict_inode()

On Fri, 12 May 2023 16:44:24 -0700 Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Wed, 10 May 2023 00:29:56 +0900 Ryusuke Konishi <konishi.ryusuke@...il.com> wrote:
> 
> > During unmount process of nilfs2, nothing holds nilfs_root structure after
> > nilfs2 detaches its writer in nilfs_detach_log_writer().  However, since
> > nilfs_evict_inode() uses nilfs_root for some cleanup operations, it may
> > cause use-after-free read if inodes are left in "garbage_list" and
> > released by nilfs_dispose_list() at the end of nilfs_detach_log_writer().
> > 
> > Fix this issue by modifying nilfs_evict_inode() to only clear inode
> > without additional metadata changes that use nilfs_root if the file system
> > is degraded to read-only or the writer is detached.
> > 
> > ...
> >
> > --- a/fs/nilfs2/inode.c
> > +++ b/fs/nilfs2/inode.c
> > @@ -917,6 +917,7 @@ void nilfs_evict_inode(struct inode *inode)
> >  	struct nilfs_transaction_info ti;
> >  	struct super_block *sb = inode->i_sb;
> >  	struct nilfs_inode_info *ii = NILFS_I(inode);
> > +	struct the_nilfs *nilfs;
> >  	int ret;
> 
> `the_nilfs' is unused - I'll zap it.

argh, sorry, brainfart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ