# CVE-2025-21945: ksmbd: fix use-after-free in smb2_lock

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/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.53%, higher than 45% of CVEs (2026-12-01)
- Published: 2025-04-01T15:41:08.471Z
- Modified: 2026-08-05T11:55:30.419Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

ksmbd: fix use-after-free in smb2_lock

If smb_lock->zero_len has value, ->llist of smb_lock is not delete and
flock is old one. It will cause use-after-free on error handling
routine.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 410ce35a2ed6d0e114132bba29af49b69880c8c7; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 8573571060ca466cbef2c6f03306b2cc7b883506; from 0626e6641f6b467447c81dd7678a69c66f7746cf before a0609097fd10d618aed4864038393dd75131289e; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 636e021646cf9b52ddfea7c809b018e91f2188cb; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 84d2d1641b71dec326e8736a749b7ee76a9599fc; 5.15 (not affected: before 5.15; from 6.1.131 up to 6.1.*; from 6.6.83 up to 6.6.*; from 6.12.19 up to 6.12.*; from 6.13.7 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 5.15 before 6.1.131; from 6.2 before 6.6.83; from 6.7 before 6.12.19; from 6.13 before 6.13.7; 6.14

## Every score

- Linux: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/410ce35a2ed6d0e114132bba29af49b69880c8c7> (patch)
- <https://git.kernel.org/stable/c/8573571060ca466cbef2c6f03306b2cc7b883506> (patch)
- <https://git.kernel.org/stable/c/a0609097fd10d618aed4864038393dd75131289e> (patch)
- <https://git.kernel.org/stable/c/636e021646cf9b52ddfea7c809b018e91f2188cb> (patch)
- <https://git.kernel.org/stable/c/84d2d1641b71dec326e8736a749b7ee76a9599fc> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## Sources

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

---

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