]> git.baikalelectronics.ru Git - kernel.git/commit
ext2: Add more validity checks for inode counts
authorJan Kara <jack@suse.cz>
Tue, 26 Jul 2022 11:13:50 +0000 (13:13 +0200)
committerJan Kara <jack@suse.cz>
Tue, 26 Jul 2022 11:24:04 +0000 (13:24 +0200)
commitfd9edb095ce12fab4130757d8b140c6ea59ba672
tree2ea5ad4a49ba397fce611a5fc5b8c5d4cd89d812
parente1520bf212b866fe50b756c929b2cc90cdb03c05
ext2: Add more validity checks for inode counts

Add checks verifying number of inodes stored in the superblock matches
the number computed from number of inodes per group. Also verify we have
at least one block worth of inodes per group. This prevents crashes on
corrupted filesystems.

Reported-by: syzbot+d273f7d7f58afd93be48@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/super.c