[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220921075227.iyhfsdnulzhtfbzd@quack3>
Date: Wed, 21 Sep 2022 09:52:27 +0200
From: Jan Kara <jack@...e.cz>
To: linux-ext4@...r.kernel.org
Cc: Jan Kara <jack@...e.cz>,
syzbot+0f2f7e65a3007d39539f@...kaller.appspotmail.com
Subject: Re: [PATCH 1/2] ext2: Add sanity checks for group and filesystem size
On Wed 14-09-22 17:47:22, Jan Kara wrote:
> Add sanity check that filesystem size does not exceed the underlying
> device size and that group size is big enough so that metadata can fit
> into it. This avoid trying to mount some crafted filesystems with
> extremely large group counts.
>
> Reported-by: syzbot+0f2f7e65a3007d39539f@...kaller.appspotmail.com
> Signed-off-by: Jan Kara <jack@...e.cz>
...
> + /* At least inode table, bitmaps, and sb have to fit in one group */
> + if (sbi->s_blocks_per_group <= sbi->s_inodes_per_group + 3) {
Indeed this should have been comparing against number of inode *table
blocks*, not number of inodes... I've fixed the patch locally, the result
is attached for reference.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
View attachment "0001-ext2-Add-sanity-checks-for-group-and-filesystem-size.patch" of type "text/x-patch" (2117 bytes)
Powered by blists - more mailing lists