Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3998782pxk; Tue, 29 Sep 2020 11:25:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAFrptLfN8gxAFHN+4Fv6Up+jraQHHUyImv7qg9sy6q5ALlMIMnU/c1E2ROsQPzc+h2y+j X-Received: by 2002:a17:907:213b:: with SMTP id qo27mr5045288ejb.441.1601403905193; Tue, 29 Sep 2020 11:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601403905; cv=none; d=google.com; s=arc-20160816; b=LLIcGB/GGbaJjRH7SOyn3U4nwr/Hgjvptwt1lA87k9gTSz/+TcJlMhfKEAmdo2byVo ArlDU+8dKGXP5rQN3YqcC0XHZGbXrXMf/9Dcbk+OGMOKhLbG6XDCyr1o4p7zwxvNE2tr K6TomDa1wOryKfpLC1gwvmIxKKcFQSuKbaeM9z5RVE634M7a0H2OFyQg+l/ZMVHcqtGN /SZGedKaVODNVGtzKgknOItq6XTVl963QsTFvGkAFg2zq5Hpx6auR2vr42FSAEFvna0B 0ic1WsA9+DRvQoD/Yao3b4vXdlHv0R6rbH/eV7MtUz2W+es7l2xcPhTX/lnXjTB4YP4d Hd0A== 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=6Wb8eWH2VS1hvBtLuzPJRh6POmFWt5US7Qgja0O2S2o=; b=uv38Fw5FFIoZyT1R6sDXAPyvNJRtYXZn47B4+N2S8JiRuUbANNUGlKJsV5KC3CPFja x8MKUn+jvvSd5pfE8HEmdmQOYwz/zGaRHRJAyeDQ12kKnEmUkhQd1C2O+UWdBu6wI2Tx fiFQnEek4zB//Ic5bG2rgQfliCz0aBjbpTGtTQ57CQCRznoY+x8q/Ymh6VZ/TLvkdQZI 6ysnePvTa66rllC9n46/mCBNscJrAh64t+YmbMcRttvWE64Uc4a1011MF5fue9QytVCs TAKgJOQEUVmXhLj4+jilbrKWqiGWtZlNID3m9q61xaOYUdAqW0oWRdofwtW10tqYvQfX g16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2GXrBt9E; 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=fail (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 h13si3469831edq.83.2020.09.29.11.24.41; Tue, 29 Sep 2020 11:25:05 -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=@kernel.org header.s=default header.b=2GXrBt9E; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbgI2Lhc (ORCPT + 99 others); Tue, 29 Sep 2020 07:37:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:50296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730005AbgI2Lgx (ORCPT ); Tue, 29 Sep 2020 07:36:53 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E39F823AAA; Tue, 29 Sep 2020 11:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379106; bh=CaRo9/AHPZPm51FSWlzZAZXiIvY/hOJpN6jhNEj6A9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2GXrBt9E/niBuEgB1oiehcSOAflUAMu7sK6Gk4uSmpmEYkYCMxAycBgpX6ziiXpPw 6OW06me6oEFKtw1yxWE9/o9o7rRRRajfxJD9+62bBmd+/Tb2z9btVO3Ca+aipvsitv c0k9LN9VCHE4w6qAjwKarKR+4lgQT6LEmc+sP2k8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Daniel Vetter , Sasha Levin Subject: [PATCH 5.4 017/388] gma/gma500: fix a memory disclosure bug due to uninitialized bytes Date: Tue, 29 Sep 2020 12:55:48 +0200 Message-Id: <20200929110011.317978186@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@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: Kangjie Lu [ Upstream commit 57a25a5f754ce27da2cfa6f413cfd366f878db76 ] `best_clock` is an object that may be sent out. Object `clock` contains uninitialized bytes that are copied to `best_clock`, which leads to memory disclosure and information leak. Signed-off-by: Kangjie Lu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191018042953.31099-1-kjlu@umn.edu Signed-off-by: Sasha Levin --- drivers/gpu/drm/gma500/cdv_intel_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index f56852a503e8d..8b784947ed3b9 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -405,6 +405,8 @@ static bool cdv_intel_find_dp_pll(const struct gma_limit_t *limit, struct gma_crtc *gma_crtc = to_gma_crtc(crtc); struct gma_clock_t clock; + memset(&clock, 0, sizeof(clock)); + switch (refclk) { case 27000: if (target < 200000) { -- 2.25.1