# CVE-2025-38142: hwmon: (asus-ec-sensors) check sensor index in read_string()

- 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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-07-03T08:35:43.521Z
- Modified: 2026-06-17T09:16:08.370Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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]

(As written by CVE List.)

## Affected

- Linux Linux: from d0ddfd241e5719d696bc0b081e260db69d368668 before 6bf529ce84dccc0074dbc704e70aee4aa545057e; from d0ddfd241e5719d696bc0b081e260db69d368668 before 4e9e45746b861ebd54c03ef301da2cb8fc990536; from d0ddfd241e5719d696bc0b081e260db69d368668 before 19bd9cde38dd4ca1771aed7afba623e7f4247c8e; from d0ddfd241e5719d696bc0b081e260db69d368668 before 7eeb3df6f07a886bdfd52757ede127a59a8784dc; from d0ddfd241e5719d696bc0b081e260db69d368668 before 25be318324563c63cbd9cb53186203a08d2f83a1; 5.18 (not affected: before 5.18; from 6.1.142 up to 6.1.*; from 6.6.94 up to 6.6.*; 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 5.18 before 6.1.142; from 6.2 before 6.6.94; from 6.7 before 6.12.34; from 6.13 before 6.15.3
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/6bf529ce84dccc0074dbc704e70aee4aa545057e> (patch)
- <https://git.kernel.org/stable/c/4e9e45746b861ebd54c03ef301da2cb8fc990536> (patch)
- <https://git.kernel.org/stable/c/19bd9cde38dd4ca1771aed7afba623e7f4247c8e> (patch)
- <https://git.kernel.org/stable/c/7eeb3df6f07a886bdfd52757ede127a59a8784dc> (patch)
- <https://git.kernel.org/stable/c/25be318324563c63cbd9cb53186203a08d2f83a1> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)

## Sources

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

---

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