# CVE-2025-21944: ksmbd: fix bug on trap in smb2_lock

- 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.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-04-01T15:41:07.977Z
- Modified: 2026-06-17T08:44:40.503Z
- Weaknesses: CWE-667
- Assigned by: Linux

## Description

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

ksmbd: fix bug on trap in smb2_lock

If lock count is greater than 1, flags could be old value.
It should be checked with flags of smb_lock, not flags.
It will cause bug-on trap from locks_free_lock in error handling
routine.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 11e0e74e14f1832a95092f2c98ed3b99f57797ee; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 8994f0ce8259f812b4f4a681d8298c6ff682efaa; from 0626e6641f6b467447c81dd7678a69c66f7746cf before dbcd7fdd86f77529210fe8978154a81cd479844c; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 2b70e3ac79eacbdf32571f7af48dd81cdd957ca8; from 0626e6641f6b467447c81dd7678a69c66f7746cf before e26e2d2e15daf1ab33e0135caf2304a0cfa2744b; 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

## References

- <https://git.kernel.org/stable/c/11e0e74e14f1832a95092f2c98ed3b99f57797ee> (patch)
- <https://git.kernel.org/stable/c/8994f0ce8259f812b4f4a681d8298c6ff682efaa> (patch)
- <https://git.kernel.org/stable/c/dbcd7fdd86f77529210fe8978154a81cd479844c> (patch)
- <https://git.kernel.org/stable/c/2b70e3ac79eacbdf32571f7af48dd81cdd957ca8> (patch)
- <https://git.kernel.org/stable/c/e26e2d2e15daf1ab33e0135caf2304a0cfa2744b> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## Sources

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

---

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