Re: [PATCH v2] thermal: core: Fix use-after-free in thermal_zone_device_unregister()

From: Daniel Lezcano
Date: Mon Aug 24 2020 - 05:34:52 EST


On 18/08/2020 01:58, Dmitry Osipenko wrote:
> The user-after-free bug in thermal_zone_device_unregister() is reported by
> KASAN. It happens because struct thermal_zone_device is released during of
> device_unregister() invocation, and hence the "tz" variable shouldn't be
> touched by thermal_notify_tz_delete(tz->id).
>
> Fixes: 55cdf0a283b8 ("thermal: core: Add notifications call in the framework")
> Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx>
> ---

Applied, thanks !


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog