CVE-2025-22038 ksmbd: validate zero num_subauth before sub_auth is accessed

High 8.3 Published Updated

An out-of-bounds read in the Linux kernel ksmbd module can cause a denial of service when accessing sub_auth with zero num_subauth.

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

CVE-2025-22038 is a high-severity vulnerability in Linux kernel, published on 16 Apr 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: validate zero num_subauth before sub_auth is accessed

Access psid->sub_auth[psid->num_subauth - 1] without checking if num_subauth is non-zero leads to an out-of-bounds read. This patch adds a validation step to ensure num_subauth != 0 before sub_auth is accessed.

Weakness: CWE-125

Which versions are affected by CVE-2025-22038?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-22038?

Apply the vendor's patch.

Is CVE-2025-22038 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-22038, DEBIAN-CVE-2025-22038, GHSA-8xw7-j864-h87q, ROOT-OS-UBUNTU-2204-CVE-2025-22038, ROOT-OS-UBUNTU-2404-CVE-2025-22038, UBUNTU-CVE-2025-22038.

Is CVE-2025-22038 in your software?

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

Check your SBOMs for free