CVE-2022-48915: thermal: core: Fix TZ_GET_TRIP NULL pointer dereference
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
thermal: core: Fix TZ_GET_TRIP NULL pointer dereference
Do not call get_trip_hyst() from thermal_genl_cmd_tz_get_trip() if the thermal zone does not define one.
The Linux kernel CVE team has assigned CVE-2022-48915 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.9 with commit 1ce50e7d408e and fixed in 5.10.104 with commit 1c0b51e62a50 Issue introduced in 5.9 with commit 1ce50e7d408e and fixed in 5.15.27 with commit 3dafbf915c05 Issue introduced in 5.9 with commit 1ce50e7d408e and fixed in 5.16.13 with commit 4c294285cec3 Issue introduced in 5.9 with commit 1ce50e7d408e and fixed in 5.17 with commit 5838a14832d4
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-48915
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/thermal/thermal_netlink.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/1c0b51e62a50e9291764d022ed44549e65d6ab9c https://git.kernel.org/stable/c/3dafbf915c05f83469e791949b5590da2aca2afb https://git.kernel.org/stable/c/4c294285cec3964b3291772ac0642c2bf440bd1b https://git.kernel.org/stable/c/5838a14832d447990827d85e90afe17e6fb9c175