summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelen Koike <koike@igalia.com>2026-03-17 17:23:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 14:07:28 +0300
commitb77de3fceafbb39f30e4ff5dc986f863d5456417 (patch)
tree23ef17ebf5dddd1fe0779de552aaae2700217589
parent2d31a5073f86a177edf44015e0dedb0c47cfd6d8 (diff)
downloadlinux-b77de3fceafbb39f30e4ff5dc986f863d5456417.tar.xz
ext4: reject mount if bigalloc with s_first_data_block != 0
commit 3822743dc20386d9897e999dbb990befa3a5b3f8 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 561f670768f9..9ceb0a356622 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3655,6 +3655,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) ||