Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4151793pxk; Tue, 8 Sep 2020 12:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYrrah3oa4DA+SVwCQiGWHii78g5H/o0Yg1SMjhWp8E5LZDfZH4Gxdk8X2p+vw+LPVIicQ X-Received: by 2002:a17:906:a00c:: with SMTP id p12mr1669282ejy.10.1599591668991; Tue, 08 Sep 2020 12:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599591668; cv=none; d=google.com; s=arc-20160816; b=Mieww+T7QdGfE24WjrY5wtB0Ktv8Oqh2g+Q5OEgBc7+goKfy8M+y7Se43UdVpNApMs GFdCN3R+04Ceupj6hNoCrsqATP2Y8pJg7dgUnpdLlNce2LcsmiI2FKMeLCc2cY/mJ1Pz oKFafDxZ9128N57WD6y2c1DjpTmdXmjqSpgBQnNU5ObtIy9AU23QpnOG2zdRq2gVBLgL pRzP4SzP+3u4xMX+zugrJ57fFZAFNC0oChJVFlM5asZuoVlwNv8radaWOVfBS8vFIN0j 5U9EmGlWuSSREkImflJwUGpOLE11mV3ErUzeLneJCshfWUlXR4NQYBpaFD8+TbThj8Ra Am8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=JYT71l4RwBZ9JyIVLu1zkG2jKdAW9mkGkFfVXGGeIWE=; b=P/ltjIt4HyB8gzY2xz8Qn2aRzaf+Z7VqdoZ5ZJl9QaPa7bk3Iwy8Fem4txeM/nrwvL GL8CDyQfv/igM78B4ByNNYxWeB6DNqZu9utdaxYnyKtyl1AUnhHtxwt7X5g4Wr/Ejt8P ORcG5TalgKi/R237hZucwGZ1RxnfZiQNaGnR8GT8pFcblKQ4KmAJuxoaPWv5I8dpXWma QlpjOXAW51K/tcN2b7UaVWFk/hpPFBtI6/WN0ED+STkUKdAKj/YXV6Sfu1RrZyF9PEQ+ mcL1kFgSCFma+5TTCs0qFyPT1LvRpqq0aDwH2XsB7yp4yktYlPG+Mba9/Y6F+7PirEcI +8RA== ARC-Authentication-Results: i=1; mx.google.com; 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=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si12293318edy.380.2020.09.08.12.00.46; Tue, 08 Sep 2020 12:01:08 -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; 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=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730976AbgIHS6v (ORCPT + 99 others); Tue, 8 Sep 2020 14:58:51 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:51744 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729014AbgIHS6j (ORCPT ); Tue, 8 Sep 2020 14:58:39 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Tue, 8 Sep 2020 11:58:37 -0700 Received: from akaher-virtual-machine.eng.vmware.com (unknown [10.197.103.239]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id C256E40B4F; Tue, 8 Sep 2020 11:58:38 -0700 (PDT) From: Ajay Kaher To: , CC: , , , , , , , , , Subject: [PATCH v2 v4.14.y 0/3] vfio: Fix for CVE-2020-12888 Date: Wed, 9 Sep 2020 00:24:23 +0530 Message-ID: <1599591263-46520-4-git-send-email-akaher@vmware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599591263-46520-1-git-send-email-akaher@vmware.com> References: <1599591263-46520-1-git-send-email-akaher@vmware.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-001.vmware.com: akaher@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CVE-2020-12888 Kernel: vfio: access to disabled MMIO space of some devices may lead to DoS scenario The VFIO modules allow users (guest VMs) to enable or disable access to the devices' MMIO memory address spaces. If a user attempts to access (read/write) the devices' MMIO address space when it is disabled, some h/w devices issue an interrupt to the CPU to indicate a fatal error condition, crashing the system. This flaw allows a guest user or process to crash the host system resulting in a denial of service. Patch 1/ is to force the user fault if PFNMAP vma might be DMA mapped before user access. Patch 2/ setup a vm_ops handler to support dynamic faulting instead of calling remap_pfn_range(). Also provides a list of vmas actively mapping the area which can later use to invalidate those mappings. Patch 3/ block the user from accessing memory spaces which is disabled by using new vma list support to zap, or invalidate, those memory mappings in order to force them to be faulted back in on access. Upstreamed patches link: https://lore.kernel.org/kvm/158871401328.15589.17598154478222071285.stgit@gimli.home Diff from v1: Fixed build break problem. [PATCH v2 v4.14.y 1/3]: Backporting of upsream commit 41311242221e: vfio/type1: Support faulting PFNMAP vmas [PATCH v2 v4.14.y 2/3]: Backporting of upsream commit 11c4cd07ba11: vfio-pci: Fault mmaps to enable vma tracking [PATCH v2 v4.14.y 3/3]: Backporting of upsream commit abafbc551fdd: vfio-pci: Invalidate mmaps and block MMIO access on disabled memory