---
id: CVE-2026-64040
title: |-
  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
summary: |-
  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…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-252
  - CWE-476
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 6.15, < 7.0.11'
  - linux_kernel = 7.1
patched:
  - linux_kernel 7.0.11
published: '2026-07-19'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T11:17:38.593'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-64040'
references:
  - url: 'https://git.kernel.org/stable/c/0940108d27c6995e02819ff832be11892f0b208b'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/86f4c1586418d50203ee8d76cba5d7b148719a32'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/8a220d1c312c66194f4a33dd52d1fba42bc2b341'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-64040.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-64040'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2502499'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-64040'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-64040'
  - url: >-
      https://lore.kernel.org/linux-cve-announce/2026071906-CVE-2026-64040-6908@gregkh/T
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - cve.org
epss: 0.0016
epssPercentile: 0.05131
ingestedAt: '2026-10-06T19:13:33.833Z'
---

## Overview

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.

## Affected

- `linux_kernel >= 6.15, < 7.0.11`
- `linux_kernel = 7.1`

## Remediation

Upgrade past the affected range:

- `linux_kernel 7.0.11`

## Vendor advisories

- **Red Hat VEX** · Low · affected: Red Hat Enterprise Linux 6 · no fix planned: Red Hat Enterprise Linux 6 · updated 2026-10-06 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-64040.json)
