thermal: core: Reference count the zone in thermal_zone_get_by_id()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
thermal: core: Reference count the zone in thermal_zone_get_by_id()
There are places in the thermal netlink code where nothing prevents the thermal zone object from going away while being accessed after it has been returned by thermal_zone_get_by_id().
To address this, make thermal_zone_get_by_id() get a reference on the thermal zone device object to be returned with the help of get_device(), under thermal_list_lock, and adjust all of its callers to this change with the help of the cleanup.h infrastructure.
From the CVE record · Linux
Linux kernel thermal netlink code can access a thermal zone after the object has gone away because thermal_zone_get_by_id() did not retain a reference to it. The input does not establish what an attacker could achieve or whether access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their vendor's advisory for affected versions; none are specified in the input.