[lvc-project] [PATCH v2] drivers: thermal: tsens: Fix null pointer dereference

Konrad Dybcio konrad.dybcio at linaro.org
Fri Apr 12 23:15:45 MSK 2024


On 11.04.2024 1:40 PM, Aleksandr Mishin wrote:
> compute_intercept_slope() is called from calibrate_8960() (in tsens-8960.c)
> as compute_intercept_slope(priv, p1, NULL, ONE_PT_CALIB) which lead to null
> pointer dereference (if DEBUG or DYNAMIC_DEBUG set).
> Fix this bug by adding null pointer check.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: dfc1193d4dbd ("thermal/drivers/tsens: Replace custom 8960 apis with generic apis")
> Signed-off-by: Aleksandr Mishin <amishin at t-argos.ru>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio at linaro.org>

Konrad



More information about the lvc-project mailing list