summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelen Koike <koike@igalia.com>2026-03-17 11:23:10 -0300
committerTheodore Ts'o <tytso@mit.edu>2026-03-27 23:36:11 -0400
commit3822743dc20386d9897e999dbb990befa3a5b3f8 (patch)
tree2e1c8ecf3a414ec8a877346978d494533667b5d4
parent9e1b14320b154094bb2c1bee6d8c6cb851fc3215 (diff)
ext4: reject mount if bigalloc with s_first_data_block != 0
bigalloc with s_first_data_block != 0 is not supported, reject mounting it. Signed-off-by: Helen Koike <koike@igalia.com> Suggested-by: Theodore Ts'o <tytso@mit.edu> Reported-by: syzbot+b73703b873a33d8eb8f6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b73703b873a33d8eb8f6 Link: https://patch.msgid.link/20260317142325.135074-1-koike@igalia.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org
-rw-r--r--fs/ext4/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 43f680c750ae..152c58fe8e01 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3633,6 +3633,13 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly)
"extents feature\n");
return 0;
}
+ if (ext4_has_feature_bigalloc(sb) &&
+ le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) {
+ ext4_msg(sb, KERN_WARNING,
+ "bad geometry: bigalloc file system with non-zero "
+ "first_data_block\n");
+ return 0;
+ }
#if !IS_ENABLED(CONFIG_QUOTA) || !IS_ENABLED(CONFIG_QFMT_V2)
if (!readonly && (ext4_has_feature_quota(sb) ||