CVE-2025-40246
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40246 is an out-of-bounds memory read vulnerability in the Linux kernel's XFS filesystem subsystem, specifically within the symlink repair code path (xrep_symlink_salvage_inline). The flaw was disclosed on December 4, 2025, and affects the Linux kernel's XFS online repair (scrub) functionality. It was identified via KFENCE (Kernel Electric Fence) during testing with the xfs/286 test case. The vulnerability has a low EPSS score of 0.024% and no CVSS score has been publicly assigned as of the time of this report (Feedly).

Technical details

The root cause is an out-of-bounds read (CWE-125) in the xrep_symlink_salvage_inline() function within the XFS kernel module. During symlink repair operations triggered via the xfs_scrub_metadata ioctl path, the function performs a memcpy that reads 184 bytes beyond the end of a KFENCE-tracked allocation. The allocation originates from xfs_init_local_fork() when loading an inode's local data fork, and the overread occurs when the repair code does not correctly bound the copy length against the actual allocated buffer size. Exploitation requires local access to trigger the XFS scrub ioctl (xfs_ioc_scrubv_metadata) on a filesystem containing a malformed or specially crafted symlink inode (Feedly).

Impact

The vulnerability causes an out-of-bounds memory read in kernel space, which can lead to kernel information disclosure (reading adjacent kernel memory) or a kernel panic/crash, impacting system availability. Because the read occurs in kernel context during a privileged scrub operation, sensitive kernel memory contents could potentially be exposed to a local attacker. The integrity of the system is not directly affected, but a kernel crash would result in a denial of service (Feedly).

Mitigation and workarounds

The fix has been committed to the Linux kernel stable tree via multiple patches (commits 7c2d68e09158, 81a8685cac4b, and 678e1cc2f482). Downstream distributions including Ubuntu (USN-8094-1 through USN-8094-5, USN-8152-1), SUSE, Oracle Linux (ELSA-2026-50112), and Red Hat have issued updated kernel packages incorporating this fix. Administrators should update to the latest patched kernel version provided by their distribution. As a temporary workaround, avoiding the use of xfs_scrub on filesystems with potentially malformed symlinks can reduce exposure (Ubuntu Advisory, Feedly).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64564NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel6.12
NoYesAug 04, 2026
CVE-2026-64563NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-5.4
NoYesAug 04, 2026
CVE-2026-64562NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-5.15
NoYesAug 04, 2026
CVE-2026-64561NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-6.17
NoYesAug 04, 2026
CVE-2022-4994NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-debug-modules
NoYesJul 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management