[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 00/12] Restricted DMA
- To: Claire Chang <tientzu@xxxxxxxxxxxx>
- From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- Date: Wed, 23 Jun 2021 04:38:07 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gaj3bJH1nWu6cTGQb4/Le70tkQtz+SbdZZs371zuQ8E=; b=eVDrNfym1ZvFsYrr5zsrQaj6DKmdMGd+nfXO9aUBvgPungzuPacqps/PzkFUUn1JfOcHGZ7Fejvqma9G3PRm2NxULBFvZK9xs61Z24tfU0b6SyaVjL+Oa/nYKDLsR9ohJTaGTxGi6lECKxIa7l2o6sdoZPFNCbdHO6ysxj/qTiLE5d0JuAzpil/fCDWfGs45vFQdgg1Oq75aaC2xVQVifxY5Uj/wq5tFa/dnCAZwYD6+LeoscsfyWejQda/ONqlszALC9L9aJ3BiAhNXdKgZmeQg28eeT4dCbxd0t8ZVzeqj7Nd+UDkcVVfNCPeupNPNceDDgzxMTXf3ohMfCfpNeg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WI1aUnHQhxE0AtLgfze/R8DRK+DeDYFnaJwzSqeodH0g5wP1xbTQX4TYCvBrqNLFh8JN0Pu+v8g7oe3oPcrT51Ph75Ii8Q3sKIx3Pkn0wMNwc1Z2aACj9Rh5jmQT7PSESiRHCCK0PhTuWmDFYQSm83/jacQhndlz9V1w7aICOjdLP9Vn+cpAlJXiW9q1neE0QbnZcFWZuOZsV/0Q9V52WNeGbq4RzqMYjNYWEIPTkxTEfBTHrDei4CAZCry1tPlwRitIGRtcLIVE3rglJ9fPVXc201yo207Nc4ho6X/HnAeRjsgzuxh81ffo4mZOMZ+Wx0xu8at+px9CYueFYAsBZw==
- Authentication-results: chromium.org; dkim=none (message not signed) header.d=none;chromium.org; dmarc=none action=none header.from=oracle.com;
- Cc: Rob Herring <robh+dt@xxxxxxxxxx>, mpe@xxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Frank Rowand <frowand.list@xxxxxxxxx>, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, Christoph Hellwig <hch@xxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, "list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, sstabellini@xxxxxxxxxx, Robin Murphy <robin.murphy@xxxxxxx>, grant.likely@xxxxxxx, xypron.glpk@xxxxxx, Thierry Reding <treding@xxxxxxxxxx>, mingo@xxxxxxxxxx, bauerman@xxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, Saravana Kannan <saravanak@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, heikki.krogerus@xxxxxxxxxxxxxxx, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, linux-devicetree <devicetree@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Nicolas Boichat <drinkcat@xxxxxxxxxxxx>, Jim Quinlan <james.quinlan@xxxxxxxxxxxx>, tfiga@xxxxxxxxxxxx, bskeggs@xxxxxxxxxx, bhelgaas@xxxxxxxxxx, chris@xxxxxxxxxxxxxxxxxx, daniel@xxxxxxxx, airlied@xxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, jxgao@xxxxxxxxxx, joonas.lahtinen@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, matthew.auld@xxxxxxxxx, rodrigo.vivi@xxxxxxxxx, thomas.hellstrom@xxxxxxxxxxxxxxx, thomas.lendacky@xxxxxxx
- Delivery-date: Wed, 23 Jun 2021 08:39:28 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sat, Jun 19, 2021 at 11:40:31AM +0800, Claire Chang wrote:
> This series implements mitigations for lack of DMA access control on
> systems without an IOMMU, which could result in the DMA accessing the
> system memory at unexpected times and/or unexpected addresses, possibly
> leading to data leakage or corruption.
>
> For example, we plan to use the PCI-e bus for Wi-Fi and that PCI-e bus is
> not behind an IOMMU. As PCI-e, by design, gives the device full access to
> system memory, a vulnerability in the Wi-Fi firmware could easily escalate
> to a full system exploit (remote wifi exploits: [1a], [1b] that shows a
> full chain of exploits; [2], [3]).
>
> To mitigate the security concerns, we introduce restricted DMA. Restricted
> DMA utilizes the existing swiotlb to bounce streaming DMA in and out of a
> specially allocated region and does memory allocation from the same region.
> The feature on its own provides a basic level of protection against the DMA
> overwriting buffer contents at unexpected times. However, to protect
> against general data leakage and system memory corruption, the system needs
> to provide a way to restrict the DMA to a predefined memory region (this is
> usually done at firmware level, e.g. MPU in ATF on some ARM platforms [4]).
>
> [1a]
> https://googleprojectzero.blogspot.com/2017/04/over-air-exploiting-broadcoms-wi-fi_4.html
> [1b]
> https://googleprojectzero.blogspot.com/2017/04/over-air-exploiting-broadcoms-wi-fi_11.html
> [2] https://blade.tencent.com/en/advisories/qualpwn/
> [3]
> https://www.bleepingcomputer.com/news/security/vulnerabilities-found-in-highly-popular-firmware-for-wifi-chips/
> [4]
> https://github.com/ARM-software/arm-trusted-firmware/blob/master/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c#L132
Heya Claire,
I put all your patches on
https://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git/log/?h=devel/for-linus-5.14
Please double-check that they all look ok.
Thank you!
|