[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200810180508.GG2026@suse.cz>
Date: Mon, 10 Aug 2020 20:05:08 +0200
From: David Sterba <dsterba@...e.cz>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Pavel Machek <pavel@...x.de>, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Yoon Jungyeon <jungyeon@...ech.edu>,
Nikolay Borisov <nborisov@...e.com>, Qu Wenruo <wqu@...e.com>,
David Sterba <dsterba@...e.com>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 09/56] btrfs: inode: Verify inode mode to avoid NULL
pointer dereference
On Tue, Aug 04, 2020 at 09:18:36AM +0200, Greg Kroah-Hartman wrote:
> On Tue, Aug 04, 2020 at 09:11:32AM +0200, Pavel Machek wrote:
> > Hi!
> >
> >
> > > @@ -6993,6 +7010,14 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
> > > extent_start = found_key.offset;
> > > if (found_type == BTRFS_FILE_EXTENT_REG ||
> > > found_type == BTRFS_FILE_EXTENT_PREALLOC) {
> > > + /* Only regular file could have regular/prealloc extent */
> > > + if (!S_ISREG(inode->vfs_inode.i_mode)) {
> > > + ret = -EUCLEAN;
> > > + btrfs_crit(fs_info,
> > > + "regular/prealloc extent found for non-regular inode %llu",
> > > + btrfs_ino(inode));
> > > + goto out;
> > > + }
> >
> > This sets ret, but function returns err. Fix was already submitted.
>
> What is the git commit id of that fix?
The fixup hasn't been merged yet, I'll send a pull request in a few days
so it should be in 5.9-rc1.
There's one more fixup of the stable candidate patch, 9f7fec0ba891
("Btrfs: fix selftests failure due to uninitialized i_mode in test
inodes"), so it would make most sense to take all three patches at once.
Powered by blists - more mailing lists