Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp852186pxk; Thu, 17 Sep 2020 19:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykPJVCJrIPg7KN0LSYEs6bv4CrKNty4FKFGrrtGQFa8h9BFWrwXaTSiv1ViSqhiilPh8H7 X-Received: by 2002:a50:cc9a:: with SMTP id q26mr37441246edi.64.1600394741785; Thu, 17 Sep 2020 19:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394741; cv=none; d=google.com; s=arc-20160816; b=TyQiQ3zyWPQWaUi1mX153xUIbD2pfXT4cL5DKoF+GJ6H5s6UMGJlBQau5gEOJbL8FO sA982ouKsTW9h1xrGn+S8i7ivYeyLk9eHivM0RQcrCKKGg5dFC0iAZupaBJLbybFPdE8 jl+DQunkXSLPyNo4WqQTcYLjz3jbtQJ7nTzFW61MVNTpE4f/kRxndiA48AuOvQ0B2I/z HRQ7kdVC7XAhA2ler6aWvYpdKOIssEDtIRicuyJG68/Be/WujkvHj6wsJ8RI9JTAcUte nwFpq8Cj6dEQ2THECPiTSBFU8Z++OnZH+2/ddFvV/pXEeV73nM9qG6YOYF73bXmpXhkZ O18w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6Wb8eWH2VS1hvBtLuzPJRh6POmFWt5US7Qgja0O2S2o=; b=gnNTXsjTdXMlRWXQnH5y2BbMbGI3P6L98MShPuFzJCGvKqSXzrz1YCLMYkBBHJ0Oru csT6vFupZgB7D+OW0FtrHEpHG+gPBluiws0OOi1qoZFdSwCeDbfljaor1+5JnJcJ0nRx 4DMNqAZxjIj0K9lV37ZBzVzQQOHgUORkGzf1RcDSh6aqCAJY+YGdbck+vhDJv+q+uMEU Yj/l8IrgSZXgEhTzh/BaLI2b3eVpTOQNRwJxX8NY2/XvsuZb/FNaPPLUJs8IQryKtrpj 4/92NIEPCFQm6cdj+yiBQb0WEpuW70b5VQ9pWdZ9kw8VWcBJbxHU0Xv++YmsV/GxX9bi F4Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q8+YkbS0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si1046987edl.282.2020.09.17.19.05.18; Thu, 17 Sep 2020 19:05:41 -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=Q8+YkbS0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726549AbgIRCBx (ORCPT + 99 others); Thu, 17 Sep 2020 22:01:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbgIRCBd (ORCPT ); Thu, 17 Sep 2020 22:01:33 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81F3B23444; Fri, 18 Sep 2020 02:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394493; bh=CaRo9/AHPZPm51FSWlzZAZXiIvY/hOJpN6jhNEj6A9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q8+YkbS0yk2DcZRBEXwBpBZiZRlmrG7DmXj96ym7K2Hrd+RcRrtcqm+tDWIHqjwLZ zvwlBIUK+MhJj11385T6nzVk3n20uOK3NWTqZcX0UkfbHBJPFNq2H0FL0S6NMwiSN5 Zo9UP41h7YWuZViSvqUNyBjWHE0Geg4sAQhBKcWg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kangjie Lu , Daniel Vetter , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.4 018/330] gma/gma500: fix a memory disclosure bug due to uninitialized bytes Date: Thu, 17 Sep 2020 21:55:58 -0400 Message-Id: <20200918020110.2063155-18-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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