PM: EM: Fix potential division-by-zero error in em_compute_costs()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.34, 6.15.3
- CVEs
- CVE-2025-38297
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 02:16 UTC · Revision 1
Source evidence
PM: EM: Fix potential division-by-zero error in em_compute_costs()
core-osv · Original sourcePublished 10 Jul 2025, 07:42 UTC
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.
osv:CVE-2025-38297
Kernel
Fixed versions: 6.12.34, 6.15.3
Complete source record
{
"id": "5934ceee1bf48abdd0594f96149ab06e55a183cd811522f1e43431f7afde9bda",
"url": "https://osv.dev/vulnerability/CVE-2025-38297",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "PM: EM: Fix potential division-by-zero error in em_compute_costs()",
"summary": "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.",
"evidence": "osv:CVE-2025-38297",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.34",
"evidence": "/affected/1/ranges"
},
{
"value": "6.15.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-38297",
"aliases": [
"CVE-2025-38297"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "1b600da510735a0f92c8b4140a7e2cb037a6a6c3"
},
{
"fixed": "81d72f9241d884ec29524431f74f8009310cfa0c"
},
{
"fixed": "14cbdd64f3870cf0a2d94b87919b9056448c59a0"
},
{
"fixed": "179c0c7044a378198adb36f2a12410ab68cc730a"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38297.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.9.0"
},
{
"fixed": "6.12.34"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.15.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38297.json"
}
}
],
"modified": "2026-10-28T02:30:49.243716031Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/14cbdd64f3870cf0a2d94b87919b9056448c59a0",
"https://git.kernel.org/stable/c/179c0c7044a378198adb36f2a12410ab68cc730a",
"https://git.kernel.org/stable/c/81d72f9241d884ec29524431f74f8009310cfa0c",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38297.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-38297",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38297.json"
}
},
"related_cves": [
{
"value": "CVE-2025-38297",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 517294,
"published_at": "2025-07-10T07:42:10.918+00:00"
}