Skip to content

Commit 3822743

Browse files
helen-fornaziertytso
authored andcommitted
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
1 parent 9e1b143 commit 3822743

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

fs/ext4/super.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3633,6 +3633,13 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly)
36333633
"extents feature\n");
36343634
return 0;
36353635
}
3636+
if (ext4_has_feature_bigalloc(sb) &&
3637+
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) {
3638+
ext4_msg(sb, KERN_WARNING,
3639+
"bad geometry: bigalloc file system with non-zero "
3640+
"first_data_block\n");
3641+
return 0;
3642+
}
36363643

36373644
#if !IS_ENABLED(CONFIG_QUOTA) || !IS_ENABLED(CONFIG_QFMT_V2)
36383645
if (!readonly && (ext4_has_feature_quota(sb) ||

0 commit comments

Comments
 (0)