Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754666AbdCaKrc (ORCPT ); Fri, 31 Mar 2017 06:47:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753828AbdCaKrb (ORCPT ); Fri, 31 Mar 2017 06:47:31 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4A7FAB0402 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vdronov@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4A7FAB0402 Date: Fri, 31 Mar 2017 06:47:30 -0400 (EDT) From: Vladis Dronov To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <736013744.9705201.1490957250099.JavaMail.zimbra@redhat.com> In-Reply-To: <20170330102712.3123-1-vdronov@redhat.com> References: <20170330102712.3123-1-vdronov@redhat.com> Subject: Re: [PATCH] kernel: drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.40.1.12] Thread-Topic: kernel: drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() Thread-Index: I/gEF03MYQg0rgMfzTdRMaRDtnSE7g== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 31 Mar 2017 10:47:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 21 This flaw was assigned an id CVE-2017-7346 by MITRE: http://seclists.org/oss-sec/2017/q1/696 Best regards, Vladis Dronov | Red Hat, Inc. | Product Security Engineer ----- Original Message ----- From: "Vladis Dronov" To: "VMware Graphics" , "Sinclair Yeh" , "Thomas Hellstrom" , "David Airlie" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: "Vladis Dronov" Sent: Thursday, March 30, 2017 12:27:12 PM Subject: [PATCH] kernel: drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is a user-controlled 'uint32_t' value which is used as a loop count limit. This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'. References: https://bugzilla.redhat.com/show_bug.cgi?id=1437431 Signed-off-by: Vladis Dronov