]> git.itanic.dy.fi Git - linux-stable/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:38:34 +0000 (12:38 +0100)
commit0ebfaf14150f55550cffb1148ed3920143c7a69c
tree8d92dca4dcba32bf2b37fca873244a83de27d02a
parent1687845eb8f37360a9ee849a3587ab659b090773
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