CVE-2021-47202

Updated on 10 Apr 2024

Severity

5.5 Medium severity

Details

CVSS score
5.5
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Overview

About vulnerability

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().

Details

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
Amazon Linux 2 5.10 Will Not Fix
Ubuntu 18.04 Released
125 kernels
  • 4.15.0-60.67
  • 4.15.0-50.54
  • 4.15.0-47.50
  • 4.15.0-46.49
  • 4.15.0-58.64
  • 4.15.0-72.81
  • 4.15.0-69.78
  • 4.15.0-66.75
  • 4.15.0-65.74
  • 4.15.0-64.73
  • 4.15.0-55.60
  • 4.15.0-54.58
  • 4.15.0-52.56
  • 4.15.0-51.55
  • 4.15.0-70.79
  • 4.15.0-34.37
  • 4.15.0-44.47
  • 4.15.0-33.36
  • 4.15.0-39.42
  • 4.15.0-23.25
  • 4.15.0-24.26
  • 4.15.0-42.45
  • 4.15.0-36.39
  • 4.15.0-32.35
  • 4.15.0-30.32
  • 4.15.0-22.24
  • 4.15.0-43.46
  • 4.15.0-20.21
  • 4.15.0-29.31
  • 4.15.0-31.33
  • 4.15.0-35.38
  • 4.15.0-38.41
  • 4.15.0-45.48
  • 4.15.0-48.51
  • 4.15.0-53.57
  • 4.15.0-56.62
  • 4.15.0-59.66
  • 4.15.0-62.69
  • 4.15.0-63.72
  • 4.15.0-74.84
  • 4.15.0-76.86
  • 4.15.0-71.80
  • 4.15.0-73.82
  • 4.15.0-88.88
  • 4.15.0-75.85
  • 4.15.0-91.92
  • 4.15.0-94.95
  • 4.15.0-96.97
  • 4.15.0-90.91
  • 4.15.0-97.98
  • 4.15.0-99.100
  • 4.15.0-101.102
  • 4.15.0-100.101
  • 4.15.0-106.107
  • 4.15.0-109.110
  • 4.15.0-107.108
  • 4.15.0-108.109
  • 4.15.0-112.113
  • 4.15.0-111.112
  • 4.15.0-115.116
  • 4.15.0-117.118
  • 4.15.0-116.117
  • 4.15.0-118.119
  • 4.15.0-121.123
  • 4.15.0-122.124
  • 4.15.0-123.126
  • 4.15.0-124.127
  • 4.15.0-126.129
  • 4.15.0-125.128
  • 4.15.0-128.131
  • 4.15.0-129.132
  • 4.15.0-130.134
  • 4.15.0-132.136
  • 4.15.0-134.138
  • 4.15.0-135.139
  • 4.15.0-136.140
  • 4.15.0-137.141
  • 4.15.0-139.143
  • 4.15.0-140.144
  • 4.15.0-141.145
  • 4.15.0-142.146
  • 4.15.0-143.147
  • 4.15.0-144.148
  • 4.15.0-147.151
  • 4.15.0-151.157
  • 4.15.0-153.160
  • 4.15.0-154.161
  • 4.15.0-156.163
  • 4.15.0-158.166
  • 4.15.0-159.167
  • 4.15.0-161.169
  • 4.15.0-162.170
  • 4.15.0-163.171
  • 4.15.0-166.174
  • 4.15.0-167.175
  • 4.15.0-169.177
  • 4.15.0-171.180
  • 4.15.0-173.182
  • 4.15.0-175.184
  • 4.15.0-176.185
  • 4.15.0-177.186
  • 4.15.0-180.189
  • 4.15.0-184.194
  • 4.15.0-188.199
  • 4.15.0-187.198
  • 4.15.0-189.200
  • 4.15.0-191.202
  • 4.15.0-192.203
  • 4.15.0-193.204
  • 4.15.0-179.188
  • 4.15.0-194.205
  • 4.15.0-196.207
  • 4.15.0-197.208
  • 4.15.0-200.211
  • 4.15.0-201.212
  • 4.15.0-202.213
  • 4.15.0-204.215
  • 4.15.0-206.217
  • 4.15.0-208.220
  • 4.15.0-209.220
  • 4.15.0-210.221
  • 4.15.0-211.222
  • 4.15.0-212.223
  • 4.15.0-207.218
  • 4.15.0-213.224
Ubuntu 18.04 AWS Released
67 kernels
  • 4.15.0-1047.49
  • 4.15.0-1039.41
  • 4.15.0-1035.37
  • 4.15.0-1033.35
  • 4.15.0-1056.58
  • 4.15.0-1054.56
  • 4.15.0-1052.54
  • 4.15.0-1051.53
  • 4.15.0-1050.52
  • 4.15.0-1043.45
  • 4.15.0-1041.43
  • 4.15.0-1045.47
  • 4.15.0-1040.42
  • 4.15.0-1021.21
  • 4.15.0-1032.34
  • 4.15.0-1027.27
  • 4.15.0-1029.30
  • 4.15.0-1023.23
  • 4.15.0-1031.33
  • 4.15.0-1034.36
  • 4.15.0-1037.39
  • 4.15.0-1044.46
  • 4.15.0-1048.50
  • 4.15.0-1057.59
  • 4.15.0-1058.60
  • 4.15.0-1060.62
  • 4.15.0-1063.67
  • 4.15.0-1065.69
  • 4.15.0-1066.70
  • 4.15.0-1067.71
  • 4.15.0-1073.77
  • 4.15.0-1077.81
  • 4.15.0-1076.80
  • 4.15.0-1079.83
  • 4.15.0-1080.84
  • 4.15.0-1082.86
  • 4.15.0-1083.87
  • 4.15.0-1086.91
  • 4.15.0-1088.93
  • 4.15.0-1090.95
  • 4.15.0-1091.96
  • 4.15.0-1092.98
  • 4.15.0-1087.92
  • 4.15.0-1093.99
  • 4.15.0-1094.101
  • 4.15.0-1095.102
  • 4.15.0-1096.103
  • 4.15.0-1097.104
  • 4.15.0-1098.105
  • 4.15.0-1099.106
  • 4.15.0-1102.109
  • 4.15.0-1103.110
  • 4.15.0-1106.113
  • 4.15.0-1109.116
  • 4.15.0-1101.108
  • 4.15.0-1110.117
  • 4.15.0-1111.118
  • 4.15.0-1112.119
  • 4.15.0-1114.121
  • 4.15.0-1115.122
  • 4.15.0-1116.123
  • 4.15.0-1118.125
  • 4.15.0-1119.127
  • 4.15.0-1121.129
  • 4.15.0-1124.133
  • 4.15.0-1126.135
  • 4.15.0-1123.132
Ubuntu 18.04 Azure Released
17 kernels
  • 4.15.0-1023.24
  • 4.15.0-1037.39
  • 4.15.0-1022.23
  • 4.15.0-1031.32
  • 4.15.0-1013.13
  • 4.15.0-1014.14
  • 4.15.0-1035.36
  • 4.15.0-1025.26
  • 4.15.0-1021.21
  • 4.15.0-1019.19
  • 4.15.0-1012.12
  • 4.15.0-1036.38
  • 4.15.0-1009.9
  • 4.15.0-1018.18
  • 4.15.0-1028.29
  • 4.15.0-1030.31
  • 4.15.0-1032.33
Ubuntu 18.04 GCP Planned