# CVE-2025-68786: ksmbd: skip lock-range check on equal size to avoid size==0 underflow

- Severity: not scored yet
- 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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2026-01-13T15:28:59.578Z
- Modified: 2026-06-17T09:59:35.243Z
- Assigned by: Linux

## Description

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

ksmbd: skip lock-range check on equal size to avoid size==0 underflow

When size equals the current i_size (including 0), the code used to call
check_lock_range(filp, i_size, size - 1, WRITE), which computes `size - 1`
and can underflow for size==0. Skip the equal case.

(As written by CVE List.)

## Affected

- Linux Linux: from f44158485826c076335d6860d35872271a83791d before 52fcbb92e0d3acfd1448b2a43b6595d540da5295; from f44158485826c076335d6860d35872271a83791d before da29cd197246c85c0473259f1cad897d9d28faea; from f44158485826c076335d6860d35872271a83791d before a6f4cfa3783804336491e0edcb250c25f9b59d33; from f44158485826c076335d6860d35872271a83791d before 571204e4758a528fbd67330bd4b0dfbdafb33dd8; from f44158485826c076335d6860d35872271a83791d before 5d510ac31626ed157d2182149559430350cf2104; 5.15 (not affected: before 5.15; from 6.1.160 up to 6.1.*; from 6.6.120 up to 6.6.*; from 6.12.64 up to 6.12.*; from 6.18.3 up to 6.18.*; from 6.19 up to *)

## References

- <https://git.kernel.org/stable/c/52fcbb92e0d3acfd1448b2a43b6595d540da5295>
- <https://git.kernel.org/stable/c/da29cd197246c85c0473259f1cad897d9d28faea>
- <https://git.kernel.org/stable/c/a6f4cfa3783804336491e0edcb250c25f9b59d33>
- <https://git.kernel.org/stable/c/571204e4758a528fbd67330bd4b0dfbdafb33dd8>
- <https://git.kernel.org/stable/c/5d510ac31626ed157d2182149559430350cf2104>

## Sources

- CVE List: [CVE-2025-68786](https://www.cve.org/CVERecord?id=CVE-2025-68786), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-68786](https://nvd.nist.gov/vuln/detail/CVE-2025-68786), Public domain, modified 2026-06-17

---

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