CVE Database›Document archive›CVE-2025-40312

CVE-2025-40312

kernel: Linux kernel (JFS): Data corruption, information disclosure, and system unavailability via invalid inode mode.

Loading…

Severity

Moderate

Red Hat Product Security

4.5

CVSS 3.1

Review impact separately from score.

Published · December 8, 2025

Updated · June 30, 2026

Description

A flaw was found in the Linux kernel’s Journaled File System (JFS) handling code. When inode metadata is read from disk, the inode mode field was not properly validated. If the filesystem is corrupted and presents an invalid mode value, the kernel may accept and act on that invalid mode, potentially leading to unexpected behavior in file operations, memory corruption, or denial of service. This issue could be triggered by a local attacker with access to a crafted or corrupted JFS filesystem.

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

To mitigate this issue on Red Hat Enterprise Linux 6 ELS, prevent the JFS filesystem module from loading if it is not required. This can be achieved by blacklisting the jfs module.

To blacklist the jfs module:

  1. Create a file named /etc/modprobe.d/blacklist-jfs.conf with the following content: blacklist jfs
  2. Regenerate the initramfs: dracut -f -v (for systems using dracut) mkinitrd -f -v /boot/initramfs-$(uname -r).img $(uname -r) (for systems using mkinitrd)
  3. Reboot the system for the changes to take effect.

Note: Blacklisting the jfs module will prevent the system from mounting JFS filesystems. Ensure that no critical system operations rely on JFS before applying this mitigation.

CVSS / CWE

CVSS 3.1 · 4.5
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

CWE-1287 · Improper Validation of Specified Type of Input