# CVE-2026-64040: cachefiles: Fix error return when vfs_mkdir() fails

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-07-19T15:39:27.348Z
- Modified: 2026-10-15T11:17:38.593Z
- Weaknesses: CWE-252
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed before 86f4c1586418d50203ee8d76cba5d7b148719a32; from 406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed before 0940108d27c6995e02819ff832be11892f0b208b; from 406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed before 8a220d1c312c66194f4a33dd52d1fba42bc2b341; 6.15 (not affected: before 6.15; from 6.18.57 up to 6.18.*; from 7.0.11 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.15 before 7.0.11; 7.1

## References

- <https://git.kernel.org/stable/c/86f4c1586418d50203ee8d76cba5d7b148719a32>
- <https://git.kernel.org/stable/c/0940108d27c6995e02819ff832be11892f0b208b> (patch)
- <https://git.kernel.org/stable/c/8a220d1c312c66194f4a33dd52d1fba42bc2b341> (patch)

## Sources

- CVE List: [CVE-2026-64040](https://www.cve.org/CVERecord?id=CVE-2026-64040), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2026-64040](https://nvd.nist.gov/vuln/detail/CVE-2026-64040), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-64040 · Whole record: https://cve.day/CVE-2026-64040.json · Rebuilt by cve.day 2026-11-25T22:59:28.958Z
