# CVE-2025-21660: ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-01-21T12:18:16.062Z
- Modified: 2026-06-17T08:43:57.357Z
- Assigned by: Linux

## Description

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

ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked

When `ksmbd_vfs_kern_path_locked` met an error and it is not the last
entry, it will exit without restoring changed path buffer. But later this
buffer may be used as the filename for creation.

(As written by CVE List.)

## Affected

- Linux Linux: from d1b2d2a9c912fc7b788985fbaf944e80f4b3f2af before 13e41c58c74baa71f34c0830eaa3c29d53a6e964; from 6ab95e27b77730de3fa2d601db3764490c5eede2 before 65b31b9d992c0fb0685c51a0cf09993832734fc4; from c5a709f08d40b1a082e44ffcde1aea4d2822ddd5 before 51669f4af5f7959565b48e55691ba92fabf5c587; from c5a709f08d40b1a082e44ffcde1aea4d2822ddd5 before 2ac538e40278a2c0c051cca81bcaafc547d61372; d205cb1a13b37b2660df70a972dedc8c4ba1c2e8; c1e27b70e79050530c671b9dab688386c86f039a; from 6.1.113 before 6.1.125; from 6.6.54 before 6.6.72; from 6.10.13 before 6.11; from 6.11.2 before 6.12; 6.12 (not affected: before 6.12; from 6.1.125 up to 6.1.*; from 6.6.72 up to 6.6.*; from 6.12.10 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.1.113 before 6.1.125; from 6.6.54 before 6.6.72; from 6.10.13 before 6.11; from 6.11.2 before 6.12.10; 6.13

## References

- <https://git.kernel.org/stable/c/13e41c58c74baa71f34c0830eaa3c29d53a6e964> (patch)
- <https://git.kernel.org/stable/c/65b31b9d992c0fb0685c51a0cf09993832734fc4> (patch)
- <https://git.kernel.org/stable/c/51669f4af5f7959565b48e55691ba92fabf5c587> (patch)
- <https://git.kernel.org/stable/c/2ac538e40278a2c0c051cca81bcaafc547d61372> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>

## Sources

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

---

Page: https://cve.day/CVE-2025-21660 · Whole record: https://cve.day/CVE-2025-21660.json · Rebuilt by cve.day 2026-11-25T22:58:53.453Z
