CVE-2023-3865 ksmbd: fix out-of-bound read in smb2_write

High 8.1 Published Updated

An out-of-bounds read in the ksmbd SMB2 write handler allows attackers to cause denial of service or read sensitive memory.

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-2023-3865?

CVE-2023-3865 is a high-severity memory corruption vulnerability in Linux kernel, published on 16 Aug 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: fix out-of-bound read in smb2_write

ksmbd_smb2_check_message doesn't validate hdr->NextCommand. If ->NextCommand is bigger than Offset + Length of smb2 write, It will allow oversized smb2 write length. It will cause OOB read in smb2_write.

Weakness: CWE-125

Which versions are affected by CVE-2023-3865?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-3865?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-3865 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-3865, DEBIAN-CVE-2023-3865, GHSA-mr68-gqxj-cfm9, UBUNTU-CVE-2023-3865.

Is CVE-2023-3865 in your software?

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

Check your SBOMs for free