CVE-2026-99137

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

Published Oct 28, 2026 CVSS 3.1 · 3.6 Low EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

In the Linux kernel, the CIFS file system contains a flaw where, during an O_TRUNC open that fails to acquire a writable handle, the inode size is set to zero before the server is instructed to truncate. Consequently, the local inode reports a size of 0 while the underlying SMB server file remains unchanged, creating an inconsistency in file metadata that can result in data loss or corruption for applications that later read or modify the file.

Affected Systems

All Linux kernels that include the unpatched CIFS implementation are affected. The vulnerability is tied to the Linux kernel as implemented in the cifs.c subsystem. Because no explicit kernel version range is provided, any distribution kernel that predates the fix commit is potentially vulnerable. The patch is incorporated in recent Linux kernel releases and the corresponding distribution updates.

Risk and Exploitability

The CVSS score of 3.6 indicates low severity, and the EPSS score of < 1% suggests a very low exploitation probability. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is a local or SMB client that has write access to a CIFS share and performs an O_TRUNC operation that triggers the bug. An attacker could thus make the local system report an incorrect file size, potentially confusing applications, but the flaw does not provide remote code execution or broad data disclosure by itself.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to the latest release that includes the CIFS truncation size fix provided by the Linux kernel maintainers.
  • Reboot the system so that the updated kernel image is active.
  • Temporarily avoid performing O_TRUNC operations on CIFS shares until the patch is applied; verify that the open call succeeds before trusting the reported inode size.

Generated by OpenCVE AI on October 30, 2026 at 05:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-668
Type Values Removed Values Added
Weaknesses CWE-393
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.6, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L'}

threat_severity

Low

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-362
CWE-668
Type Values Removed Values Added
Description 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.
Title cifs: don't update i_size in cifs_do_truncate without a cached handle
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-393

    Return of Wrong Status Code

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 28, 2026, 10:34 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 28, 2026, 11:17 AM
Modified
Oct 28, 2026, 11:17 AM
Severity
Low
Public date
Oct 28, 2026, 10:34 AM