]> git.itanic.dy.fi Git - linux-stable/commit
ext4: remove a BUG_ON in ext4_mb_release_group_pa()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 29 Apr 2023 20:14:46 +0000 (16:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:50:30 +0000 (11:50 +0200)
commit978e5e9111af18741449b81fefd531a622dd969a
tree5fb777399dd370a7ff881b44ea4b6121775c4164
parent2b3b8f18c0dc10bce6e5792f24df882d030fa511
ext4: remove a BUG_ON in ext4_mb_release_group_pa()

commit 463808f237cf73e98a1a45ff7460c2406a150a0b upstream.

If a malicious fuzzer overwrites the ext4 superblock while it is
mounted such that the s_first_data_block is set to a very large
number, the calculation of the block group can underflow, and trigger
a BUG_ON check.  Change this to be an ext4_warning so that we don't
crash the kernel.

Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230430154311.579720-3-tytso@mit.edu
Reported-by: syzbot+e2efa3efc15a1c9e95c3@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=69b28112e098b070f639efb356393af3ffec4220
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mballoc.c