All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Brian Johannesmeyer <bjohannesmeyer@gmail.com>
Cc: Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Michael Kelley <mikelley@microsoft.com>,
	Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
	Raphael Isemann <teemperor@gmail.com>,
	Cristiano Giuffrida <giuffrida@cs.vu.nl>,
	Herbert Bos <h.j.bos@vu.nl>, Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [RFC 0/1] swiotlb: Mitigate potential DoS caused by BUG_ON()
Date: Mon, 25 Nov 2024 09:14:57 +0100	[thread overview]
Message-ID: <20241125081456.GA16878@lst.de> (raw)
In-Reply-To: <20241122191304.4182642-1-bjohannesmeyer@gmail.com>

On Fri, Nov 22, 2024 at 08:13:03PM +0100, Brian Johannesmeyer wrote:
> It is common for drivers to store the DMA address returned by
> dma_map_single() into a coherent DMA region, which can be manipulated by a
> malicious device. For example, the E100 driver and RealTek 8139C+ driver
> map socket buffers into streaming DMA and save their DMA addresses to
> coherent DMA data. While these drivers might assume trusted hardware, this
> behavior is not necessarily unique to them.

FYI, while I don't mind replacing the BUG_ON with a WARN_ON and leaking
the swiotlb allocation, the part where the addresses are mapped so that
the device can modify them is probably what need to be fixed, and it
would also be useful to have documentation in the tree discouraging it.

      parent reply	other threads:[~2024-11-25  8:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 19:13 [RFC 0/1] swiotlb: Mitigate potential DoS caused by BUG_ON() Brian Johannesmeyer
2024-11-22 19:13 ` [RFC 1/1] swiotlb: Replace BUG_ON() with graceful error handling Brian Johannesmeyer
2024-11-22 20:34   ` Brian Johannesmeyer
2024-11-25  7:59   ` Christoph Hellwig
2024-11-25 15:03   ` Robin Murphy
2024-12-06 20:36     ` Brian Johannesmeyer
2024-11-22 20:33 ` [RFC 0/1] swiotlb: Mitigate potential DoS caused by BUG_ON() Brian Johannesmeyer
2024-11-25 13:48   ` Robin Murphy
2024-11-25  8:14 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241125081456.GA16878@lst.de \
    --to=hch@lst.de \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=bjohannesmeyer@gmail.com \
    --cc=giuffrida@cs.vu.nl \
    --cc=gregkh@linuxfoundation.org \
    --cc=h.j.bos@vu.nl \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mikelley@microsoft.com \
    --cc=robin.murphy@arm.com \
    --cc=teemperor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.