---
id: "CVE-2026-99137"
kind: "vulnerability"
aliases: ["CVE-2026-99137"]
title: "Linux kernel CIFS: truncate can leave a wrong file size on failed open"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["cifs", "linux-kernel", "runtime", "smb"]
not_affected_if: ["no-cifs-mounts"]
published_at: "2026-10-28T11:17:33+00:00"
first_seen_at: "2026-10-28T11:32:35+00:00"
updated_at: "2026-10-28T11:36:10+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99137", "first_seen_at": "2026-10-28T11:32:35+00:00"}]
---

# Linux kernel CIFS: truncate can leave a wrong file size on failed open

In the Linux kernel's CIFS client, a truncate with no cached file handle could set the local inode size to 0 even when the server-side truncate never happened. The mismatch between local and server file size is the reported flaw; the sources do not describe an attacker gaining code execution or data access.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- unknown

## Fix

- unknown

## Timeline

- 2026-10-28T11:32:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-99137

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

cifs: don't update i_size in cifs_do_truncate without a cached handle

If find_writable_file() returns null, cifs_file_flush will return
0 without issuing set_file_size, and the outer 'if (!rc)' block
will set i_size to 0 before telling the server to truncate.  If
the cifs_open() then fails, the inode will have size 0, while
the server file is unchanged.

Move the netfs_resize_file() and cifs_setsize() into the 'if
(cfile)', so they only run after a successful set_file_size.

In the no-handle else branch, evict stale pages with
truncate_inode_pages before the O_TRUNC open to dispose of old
cache pages, and let the open response set the i_size.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
