CVE-2025-39778 objtool, nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show()

High 7.1 Published Updated

An out-of-bounds stack read in the Linux kernel's nvmet module can lead to information disclosure or system crashes.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39778?

CVE-2025-39778 is a high-severity memory corruption vulnerability in Linux kernel, published on 18 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

objtool, nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show()

The csts_state_names[] array only has six sparse entries, but the iteration code in nvmet_ctrl_state_show() iterates seven, resulting in a potential out-of-bounds stack read. Fix that.

Fixes the following warning with an UBSAN kernel:

vmlinux.o: warning: objtool: .text.nvmet_ctrl_state_show: unexpected end of section

Weakness: CWE-125

Which versions are affected by CVE-2025-39778?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39778?

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-2025-39778 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-39778, DEBIAN-CVE-2025-39778, GHSA-2h4h-cj8f-67g5, UBUNTU-CVE-2025-39778.

Is CVE-2025-39778 in your software?

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

Check your SBOMs for free