Commit 88695df2 authored by Theodore Ts'o's avatar Theodore Ts'o Committed by sanglipeng
Browse files

ext4: remove a BUG_ON in ext4_mb_release_group_pa()

stable inclusion
from stable-v5.10.180
commit b0fc279de4bf17e1710bb7e83906538ff8f11111
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b0fc279de4bf17e1710bb7e83906538ff8f11111

--------------------------------

commit 463808f2 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: default avatar <syzbot+e2efa3efc15a1c9e95c3@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?id=69b28112e098b070f639efb356393af3ffec4220


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent a12320bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment