Skip to content
Snippets Groups Projects
Commit a241f31d authored by Theodore Ts'o's avatar Theodore Ts'o Committed by Cheng Jian
Browse files

ext4: don't try to processed freed blocks until mballoc is initialized

mainline inclusion
from mainline-v5.12-rc1
commit 027f14f5357279655c3ebc6d14daff8368d4f53f
category: bugfix
bugzilla: 46758
CVE: NA

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

If we try to make any changes via the journal between when the journal
is initialized, but before the multi-block allocated is initialized,
we will end up deferencing a NULL pointer when the journal commit
callback function calls ext4_process_freed_data().

The proximate cause of this failure was commit 2d01ddc86606 ("ext4:
save error info to sb through journal if available") since file system
corruption problems detected before the call to ext4_mb_init() would
result in a journal commit before we aborted the mount of the file
system.... and we would then trigger the NULL pointer deref.

Link: https://lore.kernel.org/r/YAm8qH/0oo2ofSMR@mit.edu


Reported-by: default avatarMurphy Zhou <jencce.kernel@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

conflicts:
fs/ext4/super.c

Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 646d6931
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment