Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp634900pxv; Thu, 15 Jul 2021 12:04:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuOmEnfuRzYFXg7ae+LExZff9vO7yL/PwaMpZrT7Yq5VE8q+0lXU+JQP7Uaa473VQATn8b X-Received: by 2002:a17:907:e8c:: with SMTP id ho12mr7107044ejc.552.1626375896541; Thu, 15 Jul 2021 12:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375896; cv=none; d=google.com; s=arc-20160816; b=LCO24C8r+98U+yx7lzTJiI+uS+fYApMvKRRC34Py0xpv4snyrdmANdlWEyEj8tB1ug EX1HqzDBrQZhUrJ/KjYgU8tBqW7A2LV8nB8ZPhNBH65i8Ho3KiBhnuMwjR+gSwwBKEPV CNDB8F2etIXpoVIg7z3NkVzDyXb4JFcXKl8jIH1cLdFqpfryFuYV/7zvpbm6oddjmDzv nxklZ0qZU20CwT5AiwQBuAsIX6rm2gekC89B9v9bebGuPuNX2j9UUsHyKv5xzzINazAc lQlNp6rSAzX2i3jMp2+RGV+sxvFE2Sy4DWL+7JYvAJt0DSp+hIR3niCHsprRHrTf7TfJ jQcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oBu4q0y9q3YrPN/nHI8yw/gBIVfJMIj5h7WXrRpfWPg=; b=tP6uCLeVQv+mLLR6kQMSe31oBzTRrbAaqrkyVOtCpgtF4zK3zhfrkeC9tCd614WLwT apq4/9AUIIJkZjGLPwpmfW26CTEvSLP4N3St69LGP8AOrjaHhz1deQ5PqJPCi/dpJg89 +AINU3XVnrGlqL79qBt2/3GVHkOHK6eMDRCVGIZTG+PR/3pkS2UMBcpS445bfENTJXtm VMNlID8h/OajnFt0PtwtR+5zTR7XCO+6/ZU/qLtnwOXlFkF15uJAUTzFAPKR+f4JM0iB PCw4TUnpcoIVNknekdzdoFH5/QLqnB5vt45qI4dY5IOsrGbENG8vgjZiCdlzoXQKYuYk 6rTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XLTzu3kv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si8180730ejj.178.2021.07.15.12.04.33; Thu, 15 Jul 2021 12:04:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XLTzu3kv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242552AbhGOTEN (ORCPT + 99 others); Thu, 15 Jul 2021 15:04:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:59092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242068AbhGOSyr (ORCPT ); Thu, 15 Jul 2021 14:54:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D7A5610C7; Thu, 15 Jul 2021 18:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375113; bh=omh3opMHp52rSy7yk5V4DoLDVmYcF/ZiJEWB0V6NH18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLTzu3kvqtipuhNX2CmZ/AgfhYAE/2LZQ2u7Kql/TgDH5eIEGGzCAnkgSu9KMDquq u+g8+XJzBhS1L2+/OLNPiOC3+Yt/RwTPnhq0WEnrc1VY+hSPyD+Ke1puwDZhhIZMK7 pTP4NmU6s96LMq8eLu9OUTmy1COgIKcZEGnrai3Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Rodrigo Vivi Subject: [PATCH 5.10 165/215] drm/i915/display: Do not zero past infoframes.vsc Date: Thu, 15 Jul 2021 20:38:57 +0200 Message-Id: <20210715182628.739667703@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kees Cook commit 07b72960d2b4a087ff2445e286159e69742069cc upstream. 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(). Fixes: 1b404b7dbb10 ("drm/i915/dp: Read out DP SDPs") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210617213301.1824728-1-keescook@chromium.org (cherry picked from commit c88e2647c5bb45d04dc4302018ebe6ebbf331823) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5080,7 +5080,7 @@ static int intel_dp_vsc_sdp_unpack(struc 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;