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:58.907Z
Modified
2026-04-02T12:45:14.915796Z
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 THERMALGENLATTRCPUCAPABILITY 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 THERMALGENLATTRCPUCAPABILITY raw value was changed while intel_lpmd still uses the old value.

Although intellpmd can be updated to check the THERMALGENLVERSION and use the appropriate THERMALGENLATTRCPU_CAPABILITY value, the commit itself is questionable.

The commit introduced a new element in the middle of enum thermalgenlattr, 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 THERMALGENLATTRTZPREVTEMP attribute to the end of the enum thermalgenl_attr. This ensures that all existing thermal generic netlink attributes remain unaffected.

[ rjw: Subject edits ]

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