CVE-2026-64040

cachefiles: Fix error return when vfs_mkdir() fails

Published Jul 19, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

cachefiles: Fix error return when vfs_mkdir() fails

When vfs_mkdir() fails, the error code is not extracted from the
returned error pointer. This causes mkdir_error to be reached with
ret=0, which leads to returning ERR_PTR(0) (NULL) instead of a
proper error pointer.

Fix this by extracting the error code from the error pointer when
vfs_mkdir() fails.

Analysis

AI-generated

Technical impact

A defect in the Linux kernel cachefiles module causes vfs_mkdir() error pointers to be ignored when the call fails, which results in a zero error code and an ERR_PTR(0) value that is interpreted as NULL. This misreporting makes callers believe that a directory creation succeeded when it actually did not, potentially leading to logic errors, incorrect assumptions about the file system state, and subsequent operations on a non‑existent path. The weakness is an improper return value handling (CWE-252) with a null reference exception scenario (CWE-476).

Affected Systems

Any Linux kernel build that includes the cachefiles module and predates the patch commit 0940108d27c6 is affected. This includes the 7.1 series release candidates and any custom or embedded kernels that incorporate the module without applying the provided fix.

Risk and Exploitability

The CVSS score of 5.5 places this flaw in the medium severity band, reflecting its limited scope to error reporting rather than direct system compromise. The EPSS score is <1%, indicating a very low likelihood of actual exploitation, and the vulnerability is not listed in the CISA KEV catalog. While it does not grant direct code execution, the false success state can lead to cascading system instability or subtle logical errors, making the overall risk moderate and worth addressing promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes commit 0940108d27c6 or a later release.
  • If using a custom or embedded kernel, rebuild the kernel with the patched source or apply the individual patch file to your build.
  • When an immediate patch is not possible, disable the cachefiles module to avoid the misreporting behavior until a fix is applied.

Generated by OpenCVE AI on October 7, 2026 at 08:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-252
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-476
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: cachefiles: Fix error return when vfs_mkdir() fails When vfs_mkdir() fails, the error code is not extracted from the returned error pointer. This causes mkdir_error to be reached with ret=0, which leads to returning ERR_PTR(0) (NULL) instead of a proper error pointer. Fix this by extracting the error code from the error pointer when vfs_mkdir() fails.
Title cachefiles: Fix error return when vfs_mkdir() fails
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 15, 2026, 10:07 AM
Reserved
Jul 19, 2026, 7:54 AM
Status
Modified
Published
Jul 19, 2026, 4:17 PM
Modified
Oct 15, 2026, 11:17 AM
Severity
Low
Public date
Jul 19, 2026, 12:00 AM