CVE-2025-21840

Source
https://cve.org/CVERecord?id=CVE-2025-21840
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21840.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-21840
Downstream
Published
2025-03-07T09:09:58Z
Modified
2026-08-12T03:51:34Z
Summary
thermal/netlink: Prevent userspace segmentation fault by adjusting UAPI header
Details

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

thermal/netlink: Prevent userspace segmentation fault by adjusting UAPI header

The intel-lpmd tool [1], which uses the THERMAL_GENL_ATTR_CPU_CAPABILITY attribute to receive HFI events from kernel space, encounters a segmentation fault after commit 1773572863c4 ("thermal: netlink: Add the commands and the events for the thresholds").

The issue arises because the THERMAL_GENL_ATTR_CPU_CAPABILITY raw value was changed while intel_lpmd still uses the old value.

Although intel_lpmd can be updated to check the THERMAL_GENL_VERSION and use the appropriate THERMAL_GENL_ATTR_CPU_CAPABILITY value, the commit itself is questionable.

The commit introduced a new element in the middle of enum thermal_genl_attr, which affects many existing attributes and introduces potential risks and unnecessary maintenance burdens for userspace thermal netlink event users.

Solve the issue by moving the newly introduced THERMAL_GENL_ATTR_TZ_PREV_TEMP attribute to the end of the enum thermal_genl_attr. This ensures that all existing thermal generic netlink attributes remain unaffected.

[ rjw: Subject edits ]

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21840.json"
}
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
1773572863c43a14a3e45f0591f28b7dec1ee52a
Fixed
3a4ca365c51729143a2cab693cd40fe0bb585ef0
Fixed
c195b9c6ab9c383d7aa3f4a65879b3ca90cb378b

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21840.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21840.json"