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

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-07-10T07:42:10.918Z
- Modified: 2026-06-17T09:16:34.347Z
- Weaknesses: CWE-369
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 1b600da510735a0f92c8b4140a7e2cb037a6a6c3 before 81d72f9241d884ec29524431f74f8009310cfa0c; from 1b600da510735a0f92c8b4140a7e2cb037a6a6c3 before 14cbdd64f3870cf0a2d94b87919b9056448c59a0; from 1b600da510735a0f92c8b4140a7e2cb037a6a6c3 before 179c0c7044a378198adb36f2a12410ab68cc730a; 6.9 (not affected: before 6.9; from 6.12.34 up to 6.12.*; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.9 before 6.12.34; from 6.13 before 6.15.3

## References

- <https://git.kernel.org/stable/c/81d72f9241d884ec29524431f74f8009310cfa0c> (patch)
- <https://git.kernel.org/stable/c/14cbdd64f3870cf0a2d94b87919b9056448c59a0> (patch)
- <https://git.kernel.org/stable/c/179c0c7044a378198adb36f2a12410ab68cc730a> (patch)

## Sources

- CVE List: [CVE-2025-38297](https://www.cve.org/CVERecord?id=CVE-2025-38297), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38297](https://nvd.nist.gov/vuln/detail/CVE-2025-38297), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38297 · Whole record: https://cve.day/CVE-2025-38297.json · Rebuilt by cve.day 2026-11-25T22:59:01.061Z
