CVE-2025-37899 ksmbd: fix use-after-free in session logoff
A use-after-free in the Linux kernel ksmbd module allows attackers to potentially execute code or escalate privileges via session logoff.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-37899?
CVE-2025-37899 is a high-severity use after free vulnerability in Linux kernel, published on 20 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2025-37899?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-37899?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-37899 being exploited?
There is no known exploitation of CVE-2025-37899 in the wild and no public exploit code.
Public exploit code: 3 proofs of concept on GitHub.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-37899, DEBIAN-CVE-2025-37899, GHSA-3rcg-456g-86p6, ROOT-OS-DEBIAN-12-CVE-2025-37899, ROOT-OS-UBUNTU-2204-CVE-2025-37899, ROOT-OS-UBUNTU-2404-CVE-2025-37899 and 1 more.