mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Robin Murphy <robin.murphy@arm.com>
Cc: syzbot <syzbot+90c2d711b5218d10ce61@syzkaller.appspotmail.com>,
	baolu.lu@linux.intel.com, dwmw2@infradead.org,
	iommu@lists.linux.dev, joro@8bytes.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	will@kernel.org
Subject: Re: [syzbot] [iommu?] KASAN: slab-use-after-free Read in free_iova
Date: Thu, 13 Aug 2026 14:09:05 -0300	[thread overview]
Message-ID: <20260813170905.GB905583@ziepe.ca> (raw)
In-Reply-To: <317c8a9c-3b40-407d-bcf2-02b9be1b14b3@arm.com>

On Thu, Aug 13, 2026 at 05:59:05PM +0100, Robin Murphy wrote:
> On 11/08/2026 2:11 pm, Jason Gunthorpe wrote:
> > On Tue, Aug 11, 2026 at 01:57:38PM +0100, Robin Murphy wrote:
> > 
> > > But where would that unmap be?
> > 
> > If the theory is right then the bug would be some concurrent driver
> > thread like a work queue/timer or a user thread going into a fops that
> > outlives the driver remove function. That thread would do the unmap.
> > 
> > This is an extremely common bug class in drivers at least..
> > 
> > eg DRM has lots of challenges in this area if the guess about VGA is
> > correct.
> 
> Oh, indeed - I futzed with it a little bit and sure enough:
> 
> [  225.056075][    T1] [drm] Found bochs VGA, ID 0xb0c5.
> [  225.071671][    T1] [drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebd4000.
> [  226.061260][    T1] [drm] Initialized bochs-drm 1.0.0 for 0000:00:01.0 on minor 2
> [  229.801060][    T1] bochs-drm 0000:00:01.0: [drm] fb1: bochs-drmdrmfb frame buffer device

wow nice job to find that!

> It's a well known thing that DRM drivers can't really support device
> removal or any kind of forced driver unbinding at all, as the drm_device
> can be held open by users and outlive its underlying driver, then it's
> UAF city in more ways than anyone cares to enumerate. Furthermore, a
> completely bogus dma_unmap() of the VGA framebuffer's physical address
> in a misguided attempt to clean up a doomed unbind might well explain a
> reserved IOVA getting freed as well...
> 
> So yeah, move along folks, nothing to see here :)

I was told DRM has mitigations now, but they have to be deployed in
drivers.

So this would be a bochs driver bug I suppose?

Jason

      reply	other threads:[~2026-08-13 17:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09 23:44 syzbot
2026-08-10 10:50 ` Robin Murphy
2026-08-10 17:32   ` Jason Gunthorpe
2026-08-11  9:48     ` Will Deacon
2026-08-11 13:49       ` Jason Gunthorpe
2026-08-11 12:57     ` Robin Murphy
2026-08-11 13:11       ` Jason Gunthorpe
2026-08-13 16:59         ` Robin Murphy
2026-08-13 17:09           ` Jason Gunthorpe [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=20260813170905.GB905583@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=syzbot+90c2d711b5218d10ce61@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=will@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®