[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y4UJ3f7FcCTTq7q3@mit.edu>
Date: Mon, 28 Nov 2022 14:19:57 -0500
From: "Theodore Ts'o" <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Lukas Czerner <lczerner@...hat.com>,
Svyatoslav Feldsherov <feldsherov@...gle.com>,
syzbot+6ba92bd00d5093f7e371@...kaller.appspotmail.com,
oferz@...gle.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] fs: do not update freeing inode i_io_list
On Wed, Nov 16, 2022 at 12:15:39PM +0100, Jan Kara wrote:
> On Tue 15-11-22 20:20:01, Svyatoslav Feldsherov wrote:
> > After commit cbfecb927f42 ("fs: record I_DIRTY_TIME even if inode
> > already has I_DIRTY_INODE") writeback_single_inode can push inode with
> > I_DIRTY_TIME set to b_dirty_time list. In case of freeing inode with
> > I_DIRTY_TIME set this can happen after deletion of inode from i_io_list
> > at evict. Stack trace is following.
> >
> > evict
> > fat_evict_inode
> > fat_truncate_blocks
> > fat_flush_inodes
> > writeback_inode
> > sync_inode_metadata(inode, sync=0)
> > writeback_single_inode(inode, wbc) <- wbc->sync_mode == WB_SYNC_NONE
> >
> > This will lead to use after free in flusher thread.
> >
> > Similar issue can be triggered if writeback_single_inode in the
> > stack trace update inode->i_io_list. Add explicit check to avoid it.
> >
> > Fixes: cbfecb927f42 ("fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE")
> > Reported-by: syzbot+6ba92bd00d5093f7e371@...kaller.appspotmail.com
> > Reviewed-by: Jan Kara <jack@...e.cz>
> > Signed-off-by: Svyatoslav Feldsherov <feldsherov@...gle.com>
>
> Ted, I guess you will merge this patch since you've merged the one from
> Lukas this patch is fixing?
Sorry, I forgot to ack this earlier, but this was pushed to Linus and
it's in 6.1-rc7.
- Ted
Powered by blists - more mailing lists