Skip to main content

CVE-2021-47202: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47202cvecve-2021-47202
Published: Wed Apr 10 2024 (04/10/2024, 18:56:36 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: thermal: Fix NULL pointer dereferences in of_thermal_ functions of_parse_thermal_zones() parses the thermal-zones node and registers a thermal_zone device for each subnode. However, if a thermal zone is consuming a thermal sensor and that thermal sensor device hasn't probed yet, an attempt to set trip_point_*_temp for that thermal zone device can cause a NULL pointer dereference. Fix it. console:/sys/class/thermal/thermal_zone87 # echo 120000 > trip_point_0_temp ... Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 ... Call trace: of_thermal_set_trip_temp+0x40/0xc4 trip_point_temp_store+0xc0/0x1dc dev_attr_store+0x38/0x88 sysfs_kf_write+0x64/0xc0 kernfs_fop_write_iter+0x108/0x1d0 vfs_write+0x2f4/0x368 ksys_write+0x7c/0xec __arm64_sys_write+0x20/0x30 el0_svc_common.llvm.7279915941325364641+0xbc/0x1bc do_el0_svc+0x28/0xa0 el0_svc+0x14/0x24 el0_sync_handler+0x88/0xec el0_sync+0x1c0/0x200 While at it, fix the possible NULL pointer dereference in other functions as well: of_thermal_get_temp(), of_thermal_set_emul_temp(), of_thermal_get_trend().

AI-Powered Analysis

AILast updated: 06/26/2025, 17:05:53 UTC

Technical Analysis

CVE-2021-47202 is a vulnerability identified in the Linux kernel's thermal management subsystem, specifically within the of_thermal_ functions that handle device tree thermal zones and sensors. The vulnerability arises due to improper handling of NULL pointers when the thermal zone device attempts to access a thermal sensor device that has not yet been probed or initialized. The function of_parse_thermal_zones() is responsible for parsing thermal zones and registering thermal_zone devices for each subnode. However, if a thermal zone depends on a thermal sensor device that is not yet available, attempts to set trip point temperatures (trip_point_*_temp) for that thermal zone can lead to a NULL pointer dereference. This results in a kernel crash (kernel panic) due to an invalid memory access, as demonstrated by the kernel call trace provided. The issue affects multiple functions including of_thermal_set_trip_temp(), of_thermal_get_temp(), of_thermal_set_emul_temp(), and of_thermal_get_trend(), all of which were susceptible to NULL pointer dereferences. The vulnerability was addressed by fixing these functions to properly check for NULL pointers before dereferencing them, preventing kernel crashes. The affected Linux kernel versions include those identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and similar versions prior to the patch. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. This vulnerability primarily impacts system stability and availability rather than confidentiality or integrity, as it leads to denial of service through kernel crashes when exploited.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to the availability and reliability of Linux-based systems, especially those relying on thermal management via device tree configurations. Systems affected include servers, embedded devices, and IoT devices running vulnerable Linux kernel versions. A successful exploitation could cause system crashes, resulting in downtime, disruption of critical services, and potential data loss due to abrupt shutdowns. Organizations operating data centers, industrial control systems, or critical infrastructure that utilize Linux kernels with affected thermal management code could experience operational interruptions. While the vulnerability does not directly expose sensitive data or allow privilege escalation, the denial of service impact can affect business continuity and service-level agreements. Given the widespread use of Linux in European enterprises, particularly in cloud infrastructure, telecommunications, and manufacturing sectors, the impact could be significant if unpatched systems are exposed to malicious or accidental triggering of this flaw.

Mitigation Recommendations

European organizations should implement the following specific mitigation steps: 1) Identify and inventory all Linux systems running kernel versions that include the vulnerable commit or earlier. 2) Apply the official Linux kernel patches that fix the NULL pointer dereference in the of_thermal_ functions as soon as they become available from trusted Linux distributions or upstream sources. 3) For embedded or IoT devices where kernel updates are challenging, consider disabling or restricting access to sysfs interfaces that allow writing to trip_point_*_temp attributes to prevent unauthorized or accidental triggering of the vulnerability. 4) Implement monitoring and alerting for kernel panics or thermal subsystem errors to detect potential exploitation attempts or system instability early. 5) Test kernel updates in staging environments to ensure compatibility with existing thermal management configurations before deployment. 6) Engage with hardware and device vendors to confirm that firmware and device tree configurations are compatible with patched kernels to avoid regressions. 7) Limit user privileges to prevent unprivileged users from writing to thermal sysfs attributes, reducing the risk of exploitation via local user interaction.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-03-25T09:12:14.117Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea04d

Added to database: 5/21/2025, 9:09:09 AM

Last enriched: 6/26/2025, 5:05:53 PM

Last updated: 8/13/2025, 6:53:03 AM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats