FAILED: patch "[PATCH] drm/i915/display: Do not zero past infoframes.vsc" failed to apply to 5.13-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.13-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c88e2647c5bb45d04dc4302018ebe6ebbf331823 Mon Sep 17 00:00:00 2001
From: Kees Cook <[email protected]>
Date: Thu, 17 Jun 2021 14:33:01 -0700
Subject: [PATCH] drm/i915/display: Do not zero past infoframes.vsc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
intel_dp_vsc_sdp_unpack() was using a memset() size (36, struct dp_sdp) larger than the destination (24, struct drm_dp_vsc_sdp), clobbering fields in struct intel_crtc_state after infoframes.vsc. Use the actual target size for the memset().
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -2868,7 +2868,7 @@ static int intel_dp_vsc_sdp_unpack(struct drm_dp_vsc_sdp *vsc,if (size <sizeof (struct dp_sdp ))return -EINVAL ; -memset (vsc,0 , size); +memset (vsc,0 ,sizeof (*vsc));if (sdp->sdp_header.HB0 !=0 )return -EINVAL ;