Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp713082imj; Wed, 13 Feb 2019 16:19:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IaLeSteGCAcdPn7kTJGRSNafzJK1WXY3Hzs+rvyF2gzrzwPlVt9WTBpW6ZFFIhI6zElZ+Sj X-Received: by 2002:aa7:85d1:: with SMTP id z17mr943304pfn.226.1550103551068; Wed, 13 Feb 2019 16:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103551; cv=none; d=google.com; s=arc-20160816; b=t3zrQmWeaPhgEV7BzPTpoQDCgqDbcz5iIDm3V1ZDu+vuCO+GTCwf0v0ern5v40/SlH xhEbf0YKqazeLEcGBLMYYTXuau6lDI0Usl9a/tABuvtOlSLn+rKbd0w8Ej278aF3fmDy 9lhFxVI1G4IJ4Y+vejNeV4xMxvE5OyQdEDvDp6WkqWEpYUYuUsssPKMGZkptlTY3p2Aw oppFjGfjRgTk3FhThU9p8OHDMstJeX1EIMuVgIZAnkYra+FbL6s4iaqa9h9fHeLzDMQf Iyn5uFirE2ZgzVV+6ZSqed7gxnsasrqrbkc7IBgXbDDLFyCi5dOpLGOqx4kim2QP5dR7 400A== 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=+iOzkfMbEP/CeyUW38yrEOfgt8c1jOhnpIvEn5JEP8Y=; b=prqgqzW7Rv0EC97HME53wefa1U82HuZ9I/DP2XCT9QjH+x9Mz3ZqjqUmf026Eem42u viQIPZUpcG9zlvKF6OfqM/iWObpB03rRAf/ACLbWdlhfU8EMl4HCPj3WZIqS+WgHVBWf uRPb2DIfgAnA0R+OalURQlOpmLfS6HMS0ah0QhxLNH7uCULxilM88I8Lz77hc/rkgJpW YOGm+SQxIp3Ybk0+YcWfUL2ZWCMqm090XTCsbGgof/5uN7AijnhmNB9xkp4aEZEwPqxS /+tvmfTt7Nntfz41wgNOAusFQ7+fAbpl/yeKtPx/M1sIo9iFAO+EyB2w/w4K/KFv8613 k3VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kRqUbwAe; 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 31si805001pla.334.2019.02.13.16.18.55; Wed, 13 Feb 2019 16:19:11 -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=kRqUbwAe; 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 S2406465AbfBMSqc (ORCPT + 99 others); Wed, 13 Feb 2019 13:46:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:45046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729808AbfBMSq3 (ORCPT ); Wed, 13 Feb 2019 13:46:29 -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 CB0B320811; Wed, 13 Feb 2019 18:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550083589; bh=3pwkpBlmhxd/MZwUH/g467coBQACOEYJlD5PrR8fXUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRqUbwAekin1zDoqwnuSfBLoT1p0RTCB6npdeFQtAT0yODIPxm3S5J2y8hmighwol 5sbgdMNUNALeFueYHWvv6Kgs8g0Z7fdF5dKY8Xg9LzilLQkNIi3Yka3Xx8PW+XHAn1 lv5we6ViIIuRe3XSt15veDYpZfReCAiWw4pGxEVY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Thomas Hellstrom , Deepak Rawat , Brian Paul , Sinclair Yeh Subject: [PATCH 4.20 42/50] drm/vmwgfx: Fix an uninitialized fence handle value Date: Wed, 13 Feb 2019 19:38:47 +0100 Message-Id: <20190213183658.995570990@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213183655.747168774@linuxfoundation.org> References: <20190213183655.747168774@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: Thomas Hellstrom commit 51fdbeb4ca1a8415c98f87cb877956ae83e71627 upstream. if vmw_execbuf_fence_commands() fails, The handle value will be uninitialized and a bogus fence handle might be copied to user-space. Cc: Fixes: 2724b2d54cda: ("drm/vmwgfx: Use new validation interface for the modesetting code v2") Reported-by: Dan Carpenter Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul #v1 Reviewed-by: Sinclair Yeh #v1 Reviewed-by: Deepak Rawat Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -2592,8 +2592,8 @@ void vmw_kms_helper_validation_finish(st user_fence_rep) { struct vmw_fence_obj *fence = NULL; - uint32_t handle; - int ret; + uint32_t handle = 0; + int ret = 0; if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) || out_fence)