Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6262641imu; Mon, 21 Jan 2019 06:03:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN4kxi4A5hqZSIP9ZNues22WNnXw+SIBYhbhADIBuo0wk4ZwVJEqb0zXeheuZBSZJdsLrgV3 X-Received: by 2002:a63:7f4f:: with SMTP id p15mr28502411pgn.296.1548079405830; Mon, 21 Jan 2019 06:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079405; cv=none; d=google.com; s=arc-20160816; b=H2yN6PXXNsCU6U93yDTOFky4BUtBZhaq+ddPAxwy9S874/9rVzn9P2GSdlV7gCMmX5 53y+fX8/IrxluKqJzrhNlZ09p+1ZrEqT9wNuMf0RN/oFqsGg9kJQu6Y/zzakCqs1GcwD 3s1QTLzN8+zlfANDA+0HW5+3MWAgxhe1AjFxy8EJdx9YYDEgIJrxeWVh5lQ4SMLwELuC 2PfiUr713O2kgdpopJa9NJB7pUg7yFLF0u6YizOY3NuswvUZgyv5M8ha4QoJ9m2AXlBE 1DOgFjhYIC9D6fCf8hsPx7LSxJ4zOY9NG4ncmc2sHTZ9Tx01Tj1/Fm5OBYtadvMc+XVH gEuw== 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=C7HfNq7HpB6+VNsRZfX+6P+K5iTqEne9FuL1g07fv8k=; b=gB/62tARW0LnaX7fnogw8p2z0MT3rDESvLvPJT/v0Gqnbs2aj5ed8vBYu8bB0+E5xS urdigBgstCHF3pq8E93kUtApkiSSQeUIt2xhSu6ggzghabggxUqSROgDmOlPJgRWv2V0 HPgiVnsiNdVsRJMd4JnfN+7kZClJdAS0eRofoEKniXEw5tC7kLyQi67JvrxJb2zldoTZ hO2cgtqpCyCvwbqhBeVpofZ/YPtZZZcYKRQBO9+eP7ZrctQTyx6zyGxVEEHb/t9NoznZ /c0FDgZrJcwktGt7y4DElh5wwhZICcSRh/B0XNFd3Nv4IcC+zZu/6gN/oFujcG9Ng1e5 fMNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cZOcRHrA; 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 j26si12074875pgl.537.2019.01.21.06.03.02; Mon, 21 Jan 2019 06:03:25 -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=cZOcRHrA; 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 S1732083AbfAUOA7 (ORCPT + 99 others); Mon, 21 Jan 2019 09:00:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:47784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732542AbfAUOA4 (ORCPT ); Mon, 21 Jan 2019 09:00:56 -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 929202087F; Mon, 21 Jan 2019 14:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548079255; bh=JWXmuhCDxw37MIaA8KyjHxpUPPNh1Ae30qmtVMqdMR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cZOcRHrAwWmsdJxgb+7f3uH/rcXjWN4qKQAPnt53ER3ZFOPjktf6A4d0h7uBkL4fG UjOuVWzCT2wJ3Yl/v2kRKqakSLk4rspxVu1AQqQOw0YB5/tj4ldXcBrQ5xkcovOR68 PTc82rYJlGtKLjymmfNoaSpiHIx5lUEN7THZriVY= 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.19 61/99] omap2fb: Fix stack memory disclosure Date: Mon, 21 Jan 2019 14:48:53 +0100 Message-Id: <20190121134916.291371113@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121134913.924726465@linuxfoundation.org> References: <20190121134913.924726465@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.19-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");