Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6250476imu; Mon, 21 Jan 2019 05:51:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN512M9gxZQelR6lu3avMu0yy9DNhMcLum8UuCKGyQbUo0ixjp8ZKTIZaey6ljNy6JNXEktq X-Received: by 2002:a63:2784:: with SMTP id n126mr28694870pgn.48.1548078681488; Mon, 21 Jan 2019 05:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548078681; cv=none; d=google.com; s=arc-20160816; b=DLMtRhNsOv2vIwx/8WOQa8K4Pixgrv8H41XB7PK1pvovQtd6PbGF4bh16S6uAVSenr KmJSgu6DY8xRkiAEZRqmTQUPxmLs/XCqVaxy04c7htbjGecib9WTCDzrAY9h5SDPFrOt U34e2proh/k8IHYfuKvOMhlqoX5FOv1REQ9LzlilJg8rKVVMa29LYg1msrASm57o+h2c 6Pvp+vydaOsJN2rxR4eAnmBZe0vK3hghui1KqCJRw+Cn0Jk0X6L7+6/YkdMyp6IQZCW/ 83r1gR4zGsyBQx8u4RkNPx0EMagmZR3yJYHJNzjCYOOpe+IyCe6ib/Byi22WQRs+Zx48 GnUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WTFeYr7cNlkUpXtrEWO9u4pW9v6gHnj55yYKYbDMhv8=; b=hdElthJfW7wxMxEJ27oJ4Q4v8VvX5lhTpw13DmVGnqkzUFm/6wYqjwRbGVyLDX67K3 VawY/bQfhrX5XRBJJ+bfVeJZqwloVAr+ndtzn/RN05wltVTa274hZpFp6Gyl2e2qFYKN OmQiWeG35v+kIupyNkv9X1m+kybbM5NEFnYmbkrvdKw12Onyyk/g/2tCJps2pl/Du6Qm e0kyGkgI/eTjPxM19m6JKcCNdszubdgbIROmGn3SevAlYMuiFjpXdinPz78yaS1DPGbT HPTYKcluRvf++/KufqFVLY6/k7sK1mO8d1T3Kx5ULLsm2bKIPIoHkNN5GGaLEDMrYKXN 8ofg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="HDw/p8ow"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si11824669plo.363.2019.01.21.05.51.04; Mon, 21 Jan 2019 05:51:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="HDw/p8ow"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729571AbfAUNtP (ORCPT + 99 others); Mon, 21 Jan 2019 08:49:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:59630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729576AbfAUNtN (ORCPT ); Mon, 21 Jan 2019 08:49:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 0629D2087F; Mon, 21 Jan 2019 13:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548078552; bh=xW458HcEI/Zl/3TwaQYve/Wx1f82B97w7IjRfZDtDQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HDw/p8owY6rRyhhdSVunmJifU2HffAJVhAGwWEs0N+4dvqLjxrrUI9VZSWI2g7jkg hYcHBypg2f6LgykkrPTpjJH92rMihQ7ub5/XGDJOP4jQJluTOr3XsjMaBa2aBjfQH+ GbeQyjUtWHpJJWckYaLnaL4+1eTBv/0hkJMgflmI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vlad Tsyrklevich , Kees Cook , security@kernel.org, Bartlomiej Zolnierkiewicz Subject: [PATCH 4.20 072/111] omap2fb: Fix stack memory disclosure Date: Mon, 21 Jan 2019 14:43:06 +0100 Message-Id: <20190121122504.399319161@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121122455.819406896@linuxfoundation.org> References: <20190121122455.819406896@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vlad Tsyrklevich commit a01421e4484327fe44f8e126793ed5a48a221e24 upstream. Using [1] for static analysis I found that the OMAPFB_QUERY_PLANE, OMAPFB_GET_COLOR_KEY, OMAPFB_GET_DISPLAY_INFO, and OMAPFB_GET_VRAM_INFO cases could all leak uninitialized stack memory--either due to uninitialized padding or 'reserved' fields. Fix them by clearing the shared union used to store copied out data. [1] https://github.com/vlad902/kernel-uninitialized-memory-checker Signed-off-by: Vlad Tsyrklevich Reviewed-by: Kees Cook Fixes: b39a982ddecf ("OMAP: DSS2: omapfb driver") Cc: security@kernel.org [b.zolnierkie: prefix patch subject with "omap2fb: "] Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c @@ -609,6 +609,8 @@ int omapfb_ioctl(struct fb_info *fbi, un int r = 0; + memset(&p, 0, sizeof(p)); + switch (cmd) { case OMAPFB_SYNC_GFX: DBG("ioctl SYNC_GFX\n");