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

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/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.28%, higher than 21% of CVEs (2026-12-01)
- Published: 2026-01-23T14:15:16.898Z
- Modified: 2026-08-05T12:12:21.985Z
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 2107ab40629aeabbec369cf34b8cf0f288c3eb1b before 11fe566b442e3bc2774191740fd377739a87a1c0; from 37a0e2b362b3150317fb6e2139de67b1e29ae5ff before 0fb87b28cafae71e9c8248432cc3a6a1fd759efc; from 450a844c045ff0895d41b05a1cbe8febd1acfcfd before e54fb2a4772545701766cba08aab20de5eace8cd; from a39e31e22a535d47b14656a7d6a893c7f6cf758c before 02e06785e85b4bd86ef3d23b7c8d87acc76773d5; from b95629435b84b9ecc0c765995204a4d8a913ed52 before 8cabcb4dd3dc85dd83a37d26efcc59a66a4074d7; from b95629435b84b9ecc0c765995204a4d8a913ed52 before cafb57f7bdd57abba87725eb4e82bbdca4959644; from 5.15.176 before 5.15.203; from 6.1.121 before 6.1.160; from 6.6.67 before 6.6.120; from 6.12.6 before 6.12.64; 6.13 (not affected: before 6.13; from 5.15.203 up to 5.15.*; from 6.1.160 up to 6.1.*; from 6.6.120 up to 6.6.*; from 6.12.64 up to 6.12.*; from 6.18.3 up to 6.18.*; from 6.19 up to *)
- linux linux_kernel: from 5.15.176 before 5.16; from 6.1.121 before 6.1.160; from 6.6.67 before 6.6.120; from 6.12.6 before 6.12.64; from 6.13.1 before 6.18.3; 6.13; 6.19

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/11fe566b442e3bc2774191740fd377739a87a1c0>
- <https://git.kernel.org/stable/c/0fb87b28cafae71e9c8248432cc3a6a1fd759efc> (patch)
- <https://git.kernel.org/stable/c/e54fb2a4772545701766cba08aab20de5eace8cd> (patch)
- <https://git.kernel.org/stable/c/02e06785e85b4bd86ef3d23b7c8d87acc76773d5> (patch)
- <https://git.kernel.org/stable/c/8cabcb4dd3dc85dd83a37d26efcc59a66a4074d7> (patch)
- <https://git.kernel.org/stable/c/cafb57f7bdd57abba87725eb4e82bbdca4959644> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2025-71150 · Whole record: https://cve.day/CVE-2025-71150.json · Rebuilt by cve.day 2026-11-25T22:59:10.836Z
