CVE-2025-40198
kernel: ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · November 12, 2025
Updated · July 30, 2026
Description
A buffer over-read vulnerability was found in the Linux kernel's ext4 filesystem when parsing mount options stored in the superblock. A local user can trigger this issue by mounting a maliciously crafted ext4 filesystem where the s_mount_opts string field lacks proper NULL termination. During mount option parsing, the code reads beyond the field's boundaries searching for the terminator, potentially accessing invalid memory and causing kernel crashes or denial of service.
Statement
The s_mount_opts field in ext4 superblocks is parsed at mount time, with the kernel relying on tune2fs to ensure NUL termination. If a malicious image lacks proper termination, parse_apply_sb_mount_options walks past the field boundary searching for the NUL byte, potentially reading adjacent superblock fields or unmapped memory. The fix treats s_mount_opts as potentially unterminated and adds explicit bounds checking during parsing.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE-170 · Improper Null Termination