{"id":"CVE-2026-89640","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:\n\ncifs: fix loff_t underflow in cifs_remap_file_range() when len == 0\n\nWith len == 0 (clone to EOF), the effective length is computed as:\n\n    len = src_inode-\u003ei_size - off;\n\nIf off \u003e i_size, this is a negative loff_t, corrupting the ByteCount\nin the FSCTL_DUPLICATE_EXTENTS_TO_FILE request and inverting the range\nin filemap_write_and_wait_range().  The existing off \u003e= i_size check\nfires only after the ioctl has already been sent.\n\nSnapshot i_size_read() once for both the bounds check and the length\ncalculation, eliminating the TOCTOU and 32-bit torn-read risk.  Reject\noff \u003e src_size with -EINVAL.  Treat off == src_size as a no-op,\nconsistent with __generic_remap_file_range_prep().","modified":"2026-09-13T03:46:39.223445376Z","published":"2026-09-11T19:45:33.289Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89640.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/6c322f5cf7476ded7a9a20f7be72462065a03c68"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b057ca17b656345d04669cb87f2aff9b31d873db"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b098f5e5858797827666e6cd73033f52fc39b5f6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c2a0dcb5a7a1516aa6eb6d5cedca6a8e76527028"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89640.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89640"},{"type":"PACKAGE","url":"https://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"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}}],"schema_version":"1.9.0"}