Skip to content
Race condition Advisory Advanced CVE-2023-32257

Linux Kernel ksmbd Session Race Condition Remote Code Execution Vulnerability

A race condition in the Linux kernel's ksmbd SMB server, during processing of session setup and logoff commands, allows a remote unauthenticated attacker to execute arbitrary code in kernel context.

Arnaud Gatignol Follow

Originally disclosed on Zero Day Initiative

High 8.1 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Linux Kernel. Authentication is not required to exploit this vulnerability, but only systems with ksmbd enabled are vulnerable.

Quentin Minster (@thalium_team), 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

Root cause

Likely a missing lock around shared session state during SMB2_SESSION_SETUP and SMB2_LOGOFF handling, leading to a use-after-free or similar race.

Impact

A remote, unauthenticated attacker could execute arbitrary code in the kernel context on systems with ksmbd enabled.

What the attacker needed

Ksmbd enabled on target; network access to SMB service

The fix

The Linux kernel was updated 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.

This is a bug in the Linux kernel's built-in file-sharing server (ksmbd). Because two operations can happen at the same time without proper coordination, an attacker can cause memory corruption and run their own code with the highest privileges. No login is needed, but only systems with ksmbd turned on are affected.

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 Arnaud Gatignol

View all

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