]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 28 Nov 2022 14:18:07 +0000 (15:18 +0100)
commit6da05aff7f3b43b4d2f1ac9522ffa4d69d611629
tree660c735957666da99f7f34864c6795466e57b59f
parent8c7bdfa7ca78a91aacb8a7edbf92fc81f0a61eed
drm/msm/hdmi: fix memory corruption with too many bridges

BugLink: https://bugs.launchpad.net/bugs/1997981
commit 4c1294da6aed1f16d47a417dcfe6602833c3c95c upstream.

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: a3376e3ec81c ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/msm/hdmi/hdmi.c