CVE-2026-64040 cachefiles: Fix error return when vfs_mkdir() fails
A missing error check in the Linux kernel cachefiles module can cause a null pointer dereference, leading to a system crash.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-64040?
CVE-2026-64040 is a medium-severity vulnerability in Linux kernel, published on 19 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-252
Which versions are affected by CVE-2026-64040?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2026-64040?
Apply the vendor's patch.
Is CVE-2026-64040 being exploited?
There is no known exploitation of CVE-2026-64040 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2026-64040, DEBIAN-CVE-2026-64040, GHSA-249r-xf46-wj4v, UBUNTU-CVE-2026-64040.