CVE-2024-27006

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-27006
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-27006.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-27006
Downstream
Published
2024-05-01T05:29:03Z
Modified
2025-10-09T06:44:59.204433Z
Summary
thermal/debugfs: Add missing count increment to thermal_debug_tz_trip_up()
Details

In the Linux kernel, the following vulnerability has been resolved:

thermal/debugfs: Add missing count increment to thermaldebugtztripup()

The count field in struct tripstats, representing the number of times the zone temperature was above the trip point, needs to be incremented in thermaldebugtztrip_up(), for two reasons.

First, if a trip point is crossed on the way up for the first time, thermaldebugupdatetemp() called from updatetemperature() does not see it because it has not been added to tripscrossed[] array in the thermal zone's struct tzdebugfs object yet. Therefore, when thermaldebugtztripup() is called after that, the trip point's count value is 0, and the attempt to divide by it during the average temperature computation leads to a divide error which causes the kernel to crash. Setting the count to 1 before the division by incrementing it fixes this problem.

Second, if a trip point is crossed on the way up, but it has been crossed on the way up already before, its count value needs to be incremented to make a record of the fact that the zone temperature is above the trip now. Without doing that, if the mitigations applied after crossing the trip cause the zone temperature to drop below its threshold, the count will not be updated for this episode at all and the average temperature in the trip statistics record will be somewhat higher than it should be.

Cc :6.8+ stable@vger.kernel.org # 6.8+

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7ef01f228c9f54c6260319858be138a8a7e9e704
Fixed
9c8215d32e730b597c809a9d2090bf8ec1b79fcf
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7ef01f228c9f54c6260319858be138a8a7e9e704
Fixed
b552f63cd43735048bbe9bfbb7a9dcfce166fbdd

Affected versions

v6.*

v6.7
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.8.1
v6.8.2
v6.8.3
v6.8.4
v6.8.5
v6.8.6
v6.8.7
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.8.8