CVE-2021-47202: thermal: Fix NULL pointer dereferences in of_thermal_ functions

Published Apr 10, 2024
·
Updated

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

thermal: Fix NULL pointer dereferences in ofthermal functions

ofparsethermalzones() parses the thermal-zones node and registers a thermalzone 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 trippointtemp for that thermal zone device can cause a NULL pointer dereference. Fix it.

console:/sys/class/thermal/thermalzone87 # echo 120000 > trippoint0temp ... Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 ... Call trace: ofthermalsettriptemp+0x40/0xc4 trippointtempstore+0xc0/0x1dc devattrstore+0x38/0x88 sysfskfwrite+0x64/0xc0 kernfsfopwriteiter+0x108/0x1d0 vfswrite+0x2f4/0x368 ksyswrite+0x7c/0xec arm64syswrite+0x20/0x30 el0svccommon.llvm.7279915941325364641+0xbc/0x1bc doel0svc+0x28/0xa0 el0svc+0x14/0x24 el0synchandler+0x88/0xec el0sync+0x1c0/0x200

While at it, fix the possible NULL pointer dereference in other functions as well: ofthermalgettemp(), ofthermalsetemultemp(), ofthermalgettrend().

Affected Software

4 affected components
Linux Linux kernel<5.4.210
Linux Linux kernel>=5.5<5.10.81
Linux Linux kernel>=5.11<5.14.21
Linux Linux kernel>=5.15<5.15.4

Event History

Apr 10, 2024
CVE Published
via MITRE·06:56 PM
Data Sourced
via MITRE·06:56 PM
Description
Data Sourced
via NVD·07:15 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2021-47202?

CVE-2021-47202 is classified as a medium severity vulnerability affecting the Linux kernel.

2

Which versions of the Linux kernel are affected by CVE-2021-47202?

CVE-2021-47202 affects Linux kernel versions up to 5.4.210 and versions between 5.5 and 5.10.81, 5.11 and 5.14.21, and 5.15 and 5.15.4.

3

How do I fix CVE-2021-47202?

To fix CVE-2021-47202, upgrade to a patched version of the Linux kernel that addresses this vulnerability.

4

What kind of issues does CVE-2021-47202 introduce in the Linux kernel?

CVE-2021-47202 introduces NULL pointer dereference issues in the thermal zone handling of the Linux kernel.

5

Is CVE-2021-47202 related to thermal zone parsing?

Yes, CVE-2021-47202 relates specifically to the thermal-zone node parsing and registration in the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203