{"id":"CVE-2025-38297","state":"PUBLISHED","title":"PM: EM: Fix potential division-by-zero error in em_compute_costs()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nPM: EM: Fix potential division-by-zero error in em_compute_costs()\n\nWhen the device is of a non-CPU type, table[i].performance won't be\ninitialized in the previous em_init_performance(), resulting in division\nby zero when calculating costs in em_compute_costs().\n\nSince the 'cost' algorithm is only used for EAS energy efficiency\ncalculations and is currently not utilized by other device drivers, we\nshould add the _is_cpu_device(dev) check to prevent this division-by-zero\nissue.","publishedAt":"2025-07-10T07:42:10.918Z","updatedAt":"2026-05-11T21:25:15.247Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"81d72f9241d884ec29524431f74f8009310cfa0c","versionType":"git"},{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"14cbdd64f3870cf0a2d94b87919b9056448c59a0","versionType":"git"},{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"179c0c7044a378198adb36f2a12410ab68cc730a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/power/energy_model.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/power/energy_model.c"]}],"references":["https://git.kernel.org/stable/c/81d72f9241d884ec29524431f74f8009310cfa0c","https://git.kernel.org/stable/c/14cbdd64f3870cf0a2d94b87919b9056448c59a0","https://git.kernel.org/stable/c/179c0c7044a378198adb36f2a12410ab68cc730a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38297.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38297","state":"PUBLISHED","datePublished":"2025-07-10T07:42:10.918Z","dateUpdated":"2026-05-11T21:25:15.247Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.002Z"},"containers":{"cna":{"title":"PM: EM: Fix potential division-by-zero error in em_compute_costs()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nPM: EM: Fix potential division-by-zero error in em_compute_costs()\n\nWhen the device is of a non-CPU type, table[i].performance won't be\ninitialized in the previous em_init_performance(), resulting in division\nby zero when calculating costs in em_compute_costs().\n\nSince the 'cost' algorithm is only used for EAS energy efficiency\ncalculations and is currently not utilized by other device drivers, we\nshould add the _is_cpu_device(dev) check to prevent this division-by-zero\nissue."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"81d72f9241d884ec29524431f74f8009310cfa0c","versionType":"git"},{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"14cbdd64f3870cf0a2d94b87919b9056448c59a0","versionType":"git"},{"version":"1b600da510735a0f92c8b4140a7e2cb037a6a6c3","status":"affected","lessThan":"179c0c7044a378198adb36f2a12410ab68cc730a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/power/energy_model.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/power/energy_model.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/81d72f9241d884ec29524431f74f8009310cfa0c"},{"url":"https://git.kernel.org/stable/c/14cbdd64f3870cf0a2d94b87919b9056448c59a0"},{"url":"https://git.kernel.org/stable/c/179c0c7044a378198adb36f2a12410ab68cc730a"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:25:15.247Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.12.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.15.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}