CVE-2026-99137: cifs: don't update i_size in cifs_do_truncate without a cached handle
cifs: don't update isize in cifsdotruncate without a cached handle
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.116-1Fixed in 7.2.15-1Fixed in 7.3.3-1 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1018.20~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-44.44 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1018.19 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1018.20 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1011.12 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-vmwareto a version that resolves this vulnerability.Fixed in 7.0.0-1007.7 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 0:6.18.62-1.1.azl4 - Compensating control
In cifs_do_truncate, in the no-handle branch, call truncate_inode_pages before the O_TRUNC open to evict stale cache pages and let the open response set i_size. Move netfs_resize_file() and cifs_setsize() into the cfile branch so they run only after set_file_size succeeds.
Event History
Frequently Asked Questions
When can a system encounter the inconsistent file-size condition?
It can occur during a CIFS truncate when no writable cached handle is found and the subsequent O_TRUNC open fails. In that case, the client inode size may be set to 0 even though the file on the server was not truncated.
What is the practical impact of this issue?
A CIFS client can retain incorrect local metadata, reporting a file size of zero while the corresponding server-side file remains unchanged. Stale cached pages may also remain present in the no-handle path.
What behavior does the fix change?
The fix updates the local size only after a successful server-side size update when a cached handle exists. When no cached handle exists, it evicts stale cached pages before the O_TRUNC open and relies on the open response to set the inode size.