CVE-2023-52480 ksmbd: fix race condition between session lookup and expire

Critical 9.8 Published Updated

A race condition in the Linux kernel ksmbd module allows use-after-free, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-52480?

CVE-2023-52480 is a critical vulnerability in Linux kernel, published on 29 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix race condition between session lookup and expire

Thread A + Thread B ksmbd_session_lookup | smb2_sess_setup sess = xa_load | | | xa_erase(&conn->sessions, sess->id); | | ksmbd_session_destroy(sess) --> kfree(sess) | // UAF! | sess->last_active = jiffies | +

This patch add rwsem to fix race condition between ksmbd_session_lookup and ksmbd_expire_session.

Weakness: CWE-362

Which versions are affected by CVE-2023-52480?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52480?

Apply the vendor's patch.

Is CVE-2023-52480 being exploited?

There is no known exploitation of CVE-2023-52480 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52480, DEBIAN-CVE-2023-52480, GHSA-v2j2-ph6r-wrg9, UBUNTU-CVE-2023-52480.

Is CVE-2023-52480 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free