# CVE-2025-37899: ksmbd: fix use-after-free in session logoff

- 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.83%, higher than 55% of CVEs (2026-11-30)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-05-20T15:21:34.782Z
- Modified: 2026-08-05T11:58:10.107Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

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

ksmbd: fix use-after-free in session logoff

The sess->user object can currently be in use by another thread, for
example if another connection has sent a session setup request to
bind to the session being free'd. The handler for that connection could
be in the smb2_sess_setup function which makes use of sess->user.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 931dc8a3670f71c45c0b1379ea4e92dafbda1aca; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 70ad6455139e26e85f48f95d0e21f351c1909342; from 0626e6641f6b467447c81dd7678a69c66f7746cf before d5ec1d79509b3ee01de02c236f096bc050221b7f; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 02d16046cd11a5c037b28c12ffb818c56dd3ef43; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 2fc9feff45d92a92cd5f96487655d5be23fb7e2b; 5.15 (not affected: before 5.15; from 6.1.159 up to 6.1.*; from 6.6.119 up to 6.6.*; from 6.12.28 up to 6.12.*; from 6.14.6 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 5.15 before 6.12.28; from 6.13 before 6.14.6; 6.15

## 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`
- 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://sean.heelan.io/2025/05/22/how-i-used-o3-to-find-cve-2025-37899-a-remote-zeroday-vulnerability-in-the-linux-kernels-smb-implementation/> (exploit, third-party-advisory)
- <https://news.ycombinator.com/item?id=44081338> (exploit, issue-tracking, third-party-advisory)
- <https://git.kernel.org/stable/c/931dc8a3670f71c45c0b1379ea4e92dafbda1aca>
- <https://git.kernel.org/stable/c/70ad6455139e26e85f48f95d0e21f351c1909342>
- <https://git.kernel.org/stable/c/d5ec1d79509b3ee01de02c236f096bc050221b7f> (patch)
- <https://git.kernel.org/stable/c/02d16046cd11a5c037b28c12ffb818c56dd3ef43> (patch)
- <https://git.kernel.org/stable/c/2fc9feff45d92a92cd5f96487655d5be23fb7e2b> (patch)

## Sources

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

---

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