Bug 2376068 (CVE-2025-38142) - CVE-2025-38142 kernel: hwmon: (asus-ec-sensors) check sensor index in read_string()
Summary: CVE-2025-38142 kernel: hwmon: (asus-ec-sensors) check sensor index in read_st...
Keywords:
Status: NEW
Alias: CVE-2025-38142
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-03 09:03 UTC by OSIDB Bzimport
Modified: 2025-07-03 17:17 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-03 09:03:21 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]

Comment 1 Avinash Hanwate 2025-07-03 17:14:47 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025070334-CVE-2025-38142-a038@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.