hwmon: (asus-ec-sensors) check sensor index in read_string()
In the Linux kernel, the following vulnerability has been resolved: hwmon: (asus-ec-sensors) check sensor index in read_string() Prevent a potential invalid memory access when the requested sensor is not found. find_ec_sensor_index() may return a negative value (e.g. -ENOENT), but its result was used without checking, which could lead to undefined behavior when passed to get_sensor_info(). Add a proper check to return -EINVAL if sensor_index is negative. Found by Linux Verification Center (linuxtesting.org) with SVACE. [groeck: Return error code returned from find_ec_sensor_index]
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.142, 6.12.34, 6.15.3, 6.6.94
- CVEs
- CVE-2025-38142
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:37 UTC · Revision 1
Source evidence
hwmon: (asus-ec-sensors) check sensor index in read_string()
core-osv · Original sourcePublished 3 Jul 2025, 08:35 UTC
In the Linux kernel, the following vulnerability has been resolved: hwmon: (asus-ec-sensors) check sensor index in read_string() Prevent a potential invalid memory access when the requested sensor is not found. find_ec_sensor_index() may return a negative value (e.g. -ENOENT), but its result was used without checking, which could lead to undefined behavior when passed to get_sensor_info(). Add a proper check to return -EINVAL if sensor_index is negative. Found by Linux Verification Center (linuxtesting.org) with SVACE. [groeck: Return error code returned from find_ec_sensor_index]
osv:CVE-2025-38142
Kernel
Fixed versions: 6.1.142, 6.6.94, 6.12.34, 6.15.3
Complete source record
{
"id": "91d1d56d96d51b22c08deeaad2db60cb2ac1237e3dc6896605acbe0f03c55966",
"url": "https://osv.dev/vulnerability/CVE-2025-38142",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "hwmon: (asus-ec-sensors) check sensor index in read_string()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: hwmon: (asus-ec-sensors) check sensor index in read_string() Prevent a potential invalid memory access when the requested sensor is not found. find_ec_sensor_index() may return a negative value (e.g. -ENOENT), but its result was used without checking, which could lead to undefined behavior when passed to get_sensor_info(). Add a proper check to return -EINVAL if sensor_index is negative. Found by Linux Verification Center (linuxtesting.org) with SVACE. [groeck: Return error code returned from find_ec_sensor_index]",
"evidence": "osv:CVE-2025-38142",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.142",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.94",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.34",
"evidence": "/affected/1/ranges"
},
{
"value": "6.15.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-38142",
"aliases": [
"CVE-2025-38142"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "d0ddfd241e5719d696bc0b081e260db69d368668"
},
{
"fixed": "6bf529ce84dccc0074dbc704e70aee4aa545057e"
},
{
"fixed": "4e9e45746b861ebd54c03ef301da2cb8fc990536"
},
{
"fixed": "19bd9cde38dd4ca1771aed7afba623e7f4247c8e"
},
{
"fixed": "7eeb3df6f07a886bdfd52757ede127a59a8784dc"
},
{
"fixed": "25be318324563c63cbd9cb53186203a08d2f83a1"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38142.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "6.1.142"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.94"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.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-38142.json"
}
}
],
"modified": "2026-10-28T02:30:28.249827507Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/19bd9cde38dd4ca1771aed7afba623e7f4247c8e",
"https://git.kernel.org/stable/c/25be318324563c63cbd9cb53186203a08d2f83a1",
"https://git.kernel.org/stable/c/4e9e45746b861ebd54c03ef301da2cb8fc990536",
"https://git.kernel.org/stable/c/6bf529ce84dccc0074dbc704e70aee4aa545057e",
"https://git.kernel.org/stable/c/7eeb3df6f07a886bdfd52757ede127a59a8784dc",
"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38142.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-38142",
"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-38142.json"
}
},
"related_cves": [
{
"value": "CVE-2025-38142",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 494607,
"published_at": "2025-07-03T08:35:43.521+00:00"
}