CVE-2021-47202: thermal: Fix NULL pointer dereferences in of_thermal_ functions
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
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47202?
CVE-2021-47202 is classified as a medium severity vulnerability affecting the Linux kernel.
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.
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.
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.
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.