]> git.ipfire.org Git - thirdparty/linux.git/commit
minix: Add required sanity checking to minix_check_superblock()
authorJori Koolstra <jkoolstra@xs4all.nl>
Mon, 8 Dec 2025 15:39:47 +0000 (16:39 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 19 Jan 2026 11:16:06 +0000 (12:16 +0100)
commit8c97a6ddc95690a938ded44b4e3202f03f15078c
treea33e49e1e877ed3eaa60a8a8cb713aeac5407968
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8
minix: Add required sanity checking to minix_check_superblock()

The fs/minix implementation of the minix filesystem does not currently
support any other value for s_log_zone_size than 0. This is also the
only value supported in util-linux; see mkfs.minix.c line 511. In
addition, this patch adds some sanity checking for the other minix
superblock fields, and moves the minix_blocks_needed() checks for the
zmap and imap also to minix_check_super_block().

This also closes a related syzbot bug report.

Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20251208153947.108343-1-jkoolstra@xs4all.nl
Reviewed-by: Jan Kara <jack@suse.cz>
Reported-by: syzbot+5ad0824204c7bf9b67f2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5ad0824204c7bf9b67f2
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/minix/inode.c