CVE-2022-48942

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
22/08/2024
Last modified:
22/08/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> hwmon: Handle failure to register sensor with thermal zone correctly<br /> <br /> If an attempt is made to a sensor with a thermal zone and it fails,<br /> the call to devm_thermal_zone_of_sensor_register() may return -ENODEV.<br /> This may result in crashes similar to the following.<br /> <br /> Unable to handle kernel NULL pointer dereference at virtual address 00000000000003cd<br /> ...<br /> Internal error: Oops: 96000021 [#1] PREEMPT SMP<br /> ...<br /> pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)<br /> pc : mutex_lock+0x18/0x60<br /> lr : thermal_zone_device_update+0x40/0x2e0<br /> sp : ffff800014c4fc60<br /> x29: ffff800014c4fc60 x28: ffff365ee3f6e000 x27: ffffdde218426790<br /> x26: ffff365ee3f6e000 x25: 0000000000000000 x24: ffff365ee3f6e000<br /> x23: ffffdde218426870 x22: ffff365ee3f6e000 x21: 00000000000003cd<br /> x20: ffff365ee8bf3308 x19: ffffffffffffffed x18: 0000000000000000<br /> x17: ffffdde21842689c x16: ffffdde1cb7a0b7c x15: 0000000000000040<br /> x14: ffffdde21a4889a0 x13: 0000000000000228 x12: 0000000000000000<br /> x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000<br /> x8 : 0000000001120000 x7 : 0000000000000001 x6 : 0000000000000000<br /> x5 : 0068000878e20f07 x4 : 0000000000000000 x3 : 00000000000003cd<br /> x2 : ffff365ee3f6e000 x1 : 0000000000000000 x0 : 00000000000003cd<br /> Call trace:<br /> mutex_lock+0x18/0x60<br /> hwmon_notify_event+0xfc/0x110<br /> 0xffffdde1cb7a0a90<br /> 0xffffdde1cb7a0b7c<br /> irq_thread_fn+0x2c/0xa0<br /> irq_thread+0x134/0x240<br /> kthread+0x178/0x190<br /> ret_from_fork+0x10/0x20<br /> Code: d503201f d503201f d2800001 aa0103e4 (c8e47c02)<br /> <br /> Jon Hunter reports that the exact call sequence is:<br /> <br /> hwmon_notify_event()<br /> --&gt; hwmon_thermal_notify()<br /> --&gt; thermal_zone_device_update()<br /> --&gt; update_temperature()<br /> --&gt; mutex_lock()<br /> <br /> The hwmon core needs to handle all errors returned from calls<br /> to devm_thermal_zone_of_sensor_register(). If the call fails<br /> with -ENODEV, report that the sensor was not attached to a<br /> thermal zone but continue to register the hwmon device.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.8 (including) 5.10.103 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.26 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.16.12 (excluding)