]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/hdmi: fix memory corruption with too many bridges
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 13 Sep 2022 08:53:14 +0000 (10:53 +0200)
committerAbhinav Kumar <quic_abhinavk@quicinc.com>
Fri, 30 Sep 2022 16:57:53 +0000 (16:57 +0000)
commit6a8e510d089eb5bc92deafeff8cab284c70de93a
treeec34d74d73c75364ea5dedae30766b614557b2b8
parenta4f82c17ab22938fc2fdaf6c08b8b85f00b57172
drm/msm/hdmi: fix memory corruption with too many bridges

Add the missing sanity check on the bridge counter to avoid corrupting
data beyond the fixed-sized bridge array in case there are ever more
than eight bridges.

Fixes: c8a7088f923f ("drm/msm: convert to drm_bridge")
Cc: stable@vger.kernel.org # 3.12
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/502670/
Link: https://lore.kernel.org/r/20220913085320.8577-5-johan+linaro@kernel.org
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
drivers/gpu/drm/msm/hdmi/hdmi.c