]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 17 Sep 2025 03:22:47 +0000 (23:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 26 Sep 2025 12:36:08 +0000 (08:36 -0400)
commit8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8
treeb53034d2aeb4a70fd127c37475b4efdb177ef833
parent12e803c8827d049ae8f2c743ef66ab87ae898375
ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()

Unlike other strings in the ext4 superblock, we rely on tune2fs to
make sure s_mount_opts is NUL terminated.  Harden
parse_apply_sb_mount_options() by treating s_mount_opts as a potential
__nonstring.

Cc: stable@vger.kernel.org
Fixes: 8b67f04ab9de ("ext4: Add mount options in superblock")
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20250916-tune2fs-v2-1-d594dc7486f0@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c