]> git.baikalelectronics.ru Git - kernel.git/commit
ext2: Check block size validity during mount
authorJan Kara <jack@suse.cz>
Wed, 1 Mar 2023 10:59:39 +0000 (11:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:44:02 +0000 (12:44 +0100)
commitd38f305a0dffc2c9a4d9dbc1640c001ad412de26
tree0f31011ea2a1c583d5a293c2c8082bfaa4bfbcf3
parent7b8b4079b66b9bd34c54f01e20c908ea031885ec
ext2: Check block size validity during mount

[ Upstream commit 62aeb94433fcec80241754b70d0d1836d5926b0a ]

Check that log of block size stored in the superblock has sensible
value. Otherwise the shift computing the block size can overflow leading
to undefined behavior.

Reported-by: syzbot+4fec412f59eba8c01b77@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext2/ext2.h
fs/ext2/super.c