CVE-2025-38297 PM: EM: Fix potential division-by-zero error in em_compute_costs()

Medium 5.5 Published Updated

A division-by-zero error in the Linux kernel's Energy Model code can cause a system crash when processing non-CPU devices.

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

CVE-2025-38297 is a medium-severity denial of service vulnerability in Linux kernel, published on 10 Jul 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:

PM: EM: Fix potential division-by-zero error in em_compute_costs()

When the device is of a non-CPU type, table[i].performance won't be initialized in the previous em_init_performance(), resulting in division by zero when calculating costs in em_compute_costs().

Since the 'cost' algorithm is only used for EAS energy efficiency calculations and is currently not utilized by other device drivers, we should add the _is_cpu_device(dev) check to prevent this division-by-zero issue.

Weakness: CWE-369

Which versions are affected by CVE-2025-38297?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38297?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-38297 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38297, DEBIAN-CVE-2025-38297, GHSA-cw7w-cfpj-r652, UBUNTU-CVE-2025-38297.

Is CVE-2025-38297 in your software?

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

Check your SBOMs for free