CVE-2026-89640

Source
https://cve.org/CVERecord?id=CVE-2026-89640
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89640.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-89640
Downstream
Published
2026-09-11T19:45:33Z
Modified
2026-09-13T03:46:39Z
Summary
cifs: fix loff_t underflow in cifs_remap_file_range() when len == 0
Details

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

cifs: fix loff_t underflow in cifs_remap_file_range() when len == 0

With len == 0 (clone to EOF), the effective length is computed as:

len = src_inode->i_size - off;

If off > i_size, this is a negative loff_t, corrupting the ByteCount in the FSCTL_DUPLICATE_EXTENTS_TO_FILE request and inverting the range in filemap_write_and_wait_range(). The existing off >= i_size check fires only after the ioctl has already been sent.

Snapshot i_size_read() once for both the bounds check and the length calculation, eliminating the TOCTOU and 32-bit torn-read risk. Reject off > src_size with -EINVAL. Treat off == src_size as a no-op, consistent with __generic_remap_file_range_prep().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89640.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
04b38d601239b4d9be641b412cf4b7456a041c67
Fixed
b098f5e5858797827666e6cd73033f52fc39b5f6
Fixed
c2a0dcb5a7a1516aa6eb6d5cedca6a8e76527028
Fixed
b057ca17b656345d04669cb87f2aff9b31d873db
Fixed
6c322f5cf7476ded7a9a20f7be72462065a03c68

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89640.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.5.0
Fixed
6.12.109
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.50
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.2.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89640.json"