Skip to content
Race condition Advisory Advanced CVE-2025-38561

Linux Kernel ksmbd smb2_sess_setup Preauth_HashValue Race Condition Remote Code Execution Vulnerability

A race condition in the Linux kernel's ksmbd SMB server, in the handling of the Preauth_HashValue field during session setup, arises from missing locking on a shared object. An authenticated remote attacker could exploit this to run code in the kernel context.

Nicholas Zubrisky Follow

Originally disclosed on Zero Day Initiative

High 8.5 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Linux Kernel. Authentication is required to exploit this vulnerability.

Nicholas Zubrisky (@NZubrisky) of Trend Research, on the Zero Day Initiative

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An authenticated remote attacker could execute arbitrary code in the context of the kernel, though the text gives no further detail on reliability or preconditions.

What the attacker needed

Authentication to the SMB service; network access to ksmbd

The fix

Linux issued an update to correct the vulnerability.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The Linux kernel includes a file-sharing server called ksmbd that speaks the SMB protocol used by Windows networks. When two actions touch the same piece of memory at the same time without a lock to take turns, the memory can end up in a bad state; here that happens during the login handshake. An attacker who can log in could abuse this timing problem to run their own code with the highest privileges on the machine.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by Nicholas Zubrisky

View all

3 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.