CVE-2023-52442 ksmbd: validate session id and tree id in compound request

Critical 9.1 Published Updated

An attacker can bypass tree ID validation in ksmbd compound requests, potentially accessing unauthorized resources.

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-52442?

CVE-2023-52442 is a critical missing authorization vulnerability in Linux kernel, published on 21 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: validate session id and tree id in compound request

`smb2_get_msg()` in smb2_get_ksmbd_tcon() and smb2_check_user_session() will always return the first request smb2 header in a compound request. if `SMB2_TREE_CONNECT_HE` is the first command in compound request, will return 0, i.e. The tree id check is skipped. This patch use ksmbd_req_buf_next() to get current command in compound.

Which versions are affected by CVE-2023-52442?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52442?

Apply the vendor's patch.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2023-52442 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52442, CVE-2023-39177, DEBIAN-CVE-2023-52442, GHSA-5wjx-fx3x-22c6, UBUNTU-CVE-2023-52442.

Is CVE-2023-52442 in your software?

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

Check your SBOMs for free