# CVE-2026-89640: cifs: fix loff_t underflow in cifs_remap_file_range() when len == 0

- Severity: High 7.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-09-11T19:45:33.289Z
- Modified: 2026-10-30T13:20:23.577Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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().

(As written by CVE List.)

## Affected

- Linux Linux: from 04b38d601239b4d9be641b412cf4b7456a041c67 before 2c6eede83b3de1268db92c7e49741761c954aa26; from 04b38d601239b4d9be641b412cf4b7456a041c67 before ce813e5eebf46851e872ce59bdc34dc5dd4e29a4; from 04b38d601239b4d9be641b412cf4b7456a041c67 before f3d1ae1e6bc4a9f559185b6e7bd2b6375ec2fdd4; from 04b38d601239b4d9be641b412cf4b7456a041c67 before 7f62817fe049b0f3652518c1ba72631ec1e0a322; from 04b38d601239b4d9be641b412cf4b7456a041c67 before b098f5e5858797827666e6cd73033f52fc39b5f6; from 04b38d601239b4d9be641b412cf4b7456a041c67 before c2a0dcb5a7a1516aa6eb6d5cedca6a8e76527028; from 04b38d601239b4d9be641b412cf4b7456a041c67 before b057ca17b656345d04669cb87f2aff9b31d873db; from 04b38d601239b4d9be641b412cf4b7456a041c67 before 6c322f5cf7476ded7a9a20f7be72462065a03c68; 4.5 (not affected: before 4.5; from 5.10.273 up to 5.10.*; from 5.15.224 up to 5.15.*; from 6.1.188 up to 6.1.*; from 6.6.157 up to 6.6.*; from 6.12.109 up to 6.12.*; from 6.18.50 up to 6.18.*; from 7.2.4 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/2c6eede83b3de1268db92c7e49741761c954aa26>
- <https://git.kernel.org/stable/c/ce813e5eebf46851e872ce59bdc34dc5dd4e29a4>
- <https://git.kernel.org/stable/c/f3d1ae1e6bc4a9f559185b6e7bd2b6375ec2fdd4>
- <https://git.kernel.org/stable/c/7f62817fe049b0f3652518c1ba72631ec1e0a322>
- <https://git.kernel.org/stable/c/b098f5e5858797827666e6cd73033f52fc39b5f6>
- <https://git.kernel.org/stable/c/c2a0dcb5a7a1516aa6eb6d5cedca6a8e76527028>
- <https://git.kernel.org/stable/c/b057ca17b656345d04669cb87f2aff9b31d873db>
- <https://git.kernel.org/stable/c/6c322f5cf7476ded7a9a20f7be72462065a03c68>

## Sources

- CVE List: [CVE-2026-89640](https://www.cve.org/CVERecord?id=CVE-2026-89640), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2026-89640](https://nvd.nist.gov/vuln/detail/CVE-2026-89640), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2026-89640 · Whole record: https://cve.day/CVE-2026-89640.json · Rebuilt by cve.day 2026-11-25T22:59:38.095Z
