Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3754995pxk; Tue, 29 Sep 2020 05:35:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaGliIOIIbXm213rymXMnZWOYkT3jSIf9I919pcOSWLZ1G7g+p5hH3+gWmfgQlk4hBc3tQ X-Received: by 2002:a17:906:cf9b:: with SMTP id um27mr3694306ejb.66.1601382940153; Tue, 29 Sep 2020 05:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601382940; cv=none; d=google.com; s=arc-20160816; b=eYtUG7NuYQaCyT4SFv8Y4u9DAjttWh9zmhQ3Ihg7TeLZxitbQopKzCIjgi/HfTweJs TsHBCIxvYMcK9xBqNc+nTd0eYrqYH78Ky7/TGHfFtcbSDNX1uI/Tz41dgHeQlZ19k0Mr ax+5ysS6s0So9kwDuV6O61tCbUiJrCsZRJPVD4gvQJ7Z+zSKl4kJGEXa0AnBPCBFRK2/ x0rnFi2GxJVTNt5cEW8H7wftQ3JwzdmEt5f73GbEm/ProMUBmH44Rt/O8/PPwZr0TqCw AqS3t25ih7J6OZrXvlejDSNtlfqlO68ug9/WdA3SDvfXLoyNj+0Jq3Xw7MTCqs8/aIfQ 00dQ== 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=WahY2gKCfS7ZY+c1vGlJ0AIjKbafi40VygyB7qwvtYk=; b=fH3KkbV6yg8WKpbq8aLXgYoj1wJGy4whXqidIO8h6Oy5n7Ex+tShzVAMthpeN5u2Dx F4zGElhLYusqLI42qgEiB18LcDcUz1+P/YjXoCPTXVyQhMAEI7A/okjAWc5U3UMrDsUl 0x90rPYAelOv3e5taxAP3xiRArFILKGW70HA+NX1TrueQo0KaXUxbC9Dlyze+sRkKbfV uIYix2wENI476F7e7GswZA92JXLxwx7GAgK59ofukSiKXcInbY8xUkXJS109KXva/RiF S16juIJrPs+IftCUwVFWPDo+G7UKSt/a8e9GcX0J9Zb1RImPb3Bu6NJR+oKZfRcSI4RR VPTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KiRcA4e2; 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 l27si2716894eja.9.2020.09.29.05.35.16; Tue, 29 Sep 2020 05:35:40 -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=KiRcA4e2; 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 S1732897AbgI2McU (ORCPT + 99 others); Tue, 29 Sep 2020 08:32:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:37022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729547AbgI2LXB (ORCPT ); Tue, 29 Sep 2020 07:23:01 -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 C6922206A5; Tue, 29 Sep 2020 11:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378447; bh=IoCVrsR79AYUsIpowAJgDUNoxfHUm/Ij+N8h1eGcPGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KiRcA4e2N0KIJQyMbvbHa3ClyBijnkzqTI2XDTXjdI8i3NgxO6P6FhXBqGa//L+7w m2iAEbVoUzryCr1c7hhMUKmqf7M0emjx7kOdo/4i+as2G/nkFApxuTG2UdQwBF2wM1 qHDwJOLHf51dPSQYwm/ni5aJOmRsnOyWBFQK4GiQ= 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 4.19 009/245] gma/gma500: fix a memory disclosure bug due to uninitialized bytes Date: Tue, 29 Sep 2020 12:57:40 +0200 Message-Id: <20200929105947.440547899@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105946.978650816@linuxfoundation.org> References: <20200929105946.978650816@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 17db4b4749d5a..2e8479744ca4a 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -415,6 +415,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