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@syzkaller.appspotmail.com > Signed-off-by: Jan Kara ... > + /* 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 SUSE Labs, CR