---
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
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-06'
sourceUpdated: '2026-10-06T18:42:03.790'
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/8a220d1c312c66194f4a33dd52d1fba42bc2b341'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
tags:
  - nvd
epss: 0.00198
epssPercentile: 0.08622
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`
