From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C634968E2 for ; Thu, 13 Aug 2026 17:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786640949; cv=none; b=eiYBXHLgbxt19PrT1dyKruilvkFVhb6veCUUyyXYr6HmBqZfm/sb36rEWeTEKrGV76jC18F8T7E/MyyLaYo654AWJxHC+zjdu7UYH8lg4B6RFaUe431AchIhFYgDjRSkSTNLdo3rbjIXwK8dDXbGmhK6nQ5Lmt5iBYxgmFr8VA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786640949; c=relaxed/simple; bh=pjp/OfeQHhVWdT3jgV5w5E5OgdF/qaSYH+WqNsGsneI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NaS3gAyft1sW8mC0tr8ku+az8Qk3lXoeHaoF7y45XGenvNS59aCDweb86BoOuhkkdDJxUcsl8T8g4ZtRA9LglzLp/7sbxqKn559P92hYMoDbJ7O3j0MZyLgjPO5p4Z3gydCtt6y0DlJ7ExkiMzjirKuGGo+uIK0xUxrBix/4+jU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=jvnY6FEs; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="jvnY6FEs" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-8f186025973so759296d6.0 for ; Thu, 13 Aug 2026 10:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1786640946; x=1787245746; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=nYcDUJGUC25Nk5HBlqapVMecG82Gc8I0/R2s4LHak/k=; b=jvnY6FEsPXYjNmHLywFxCpIGOfU0jw60Cnr5g4rfGv+JBUdgf4wv7R/jgu/lzkx0mw j+mMAIZ0ZICsJVCloMUgxFcdrVi27kzktYSkpXRhoUeU0GiD0CXm4RacYEe/LB4EdX/e DStdRKSuwuVS42wJ0TBiDFpVxcY884k9uIoggqLpTvwFVPmfuhUHR4FFahbhM7a/9Y6h /rnZ/CfuQCQO51wgJqMBO5d6QpV+T8GG8DheDEgEIlCAPMJxCaer9Xeohi9SGNbQDXVE J5xpWukr0cSFNQnrILzxOnfR+JPz91IyAk36SrqAGOiJgJSQ8btqYbVFRO6PU03mEB7c JUww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786640946; x=1787245746; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nYcDUJGUC25Nk5HBlqapVMecG82Gc8I0/R2s4LHak/k=; b=Gp2+wDp8M1e3Dah9avoj1HS8TOfLHqbnvXpRz+MZspwsYarTggKF++DhrirFS90Mf2 7jquyaamDg8Ls2auiKasiJJx2V0EiGawD/ZzNcPJP0do+ZYe++HGHjc0tlDYKxeYs7GH AVzmKarZ1rPen9hMmBh+TJXYHqZ1BQw2pMVU8RBX4QlW0cCsTiazEUyYKEZfzLJjTbPp Vx31e01AMHCDU6urof9jGT3hiPJIZlcN1YULhHfADbw2srWAWNo46LaD7qFmiRpqVS+H Ml8ioveHdDFHPDyhR3L7n/I+Ky3G3Z+AACDeQUI91AUTZGqHBt3cUy7Y44CLUtkWl3sp 3kDw== X-Forwarded-Encrypted: i=1; AHgh+RpaRTpzcNpmFRVMHolpmpVVXl2fbmLOxAa61804wkNiq4+5+4oV/zOHnCNZeS6GhLnltlbIazHtRDOQMs0=@vger.kernel.org X-Gm-Message-State: AOJu0YwnEiUrkuo81vpyAQoIShqUgapt9RgEY6+DFCmXOl8G1ZwsqKYA CO4yZI04xhlk8Bwpr3DZd6coC8KGWrWNlv05R3kyPcIC383dek93iMNHQRBFgkXbRjs= X-Gm-Gg: AR+sD10tYAE156IOOaP/PSkRYVOdVX7Xc+yNuZqZv/6NjnyEF3e7PLDeKONJsl3QotQ C3MdYgm0IWdDqZ7jRJ3XDt3sqG6Me2QzmJ+K2RfcMt3NDnwh+stQPph4n7KGcXe35GX3pJrGrOp CEaq2GSNjXHfS9JtAneOb0m7Yz2LqPnKWoz3YWsLpssgMMjqXPpo4+pUvyRHJ6N8Xc+Gq1A+0sE XNJ7lR+x0b6d6bOE7sW0Q7K3G3MhkU8mJuqIqWa0WVv3vS+D4xCKfCpsTyf+VhDQXVES2WcakxJ BoQnDjaUfCa12HxQ6fM/wE8GkKOi/m6b67XhKjsuE75N5mFpNBwCV44SYOKShx499Eqeog75qCm 8mdVMIECr8Om4SHow6gBV0LeY/UHhtLcxSJrjcuOdg2SrR+sZnKsugjoKwju80QnQHTdValR24o Gw0Xf6K1FY0Oos6ITMNQft2vNb0xnGyjU+bFJliw== X-Received: by 2002:a05:6214:c44:b0:908:a729:73bf with SMTP id 6a1803df08f44-90a80c2d2e8mr89485816d6.22.1786640946476; Thu, 13 Aug 2026 10:09:06 -0700 (PDT) Received: from ziepe.ca ([142.166.156.215]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90a81aba12dsm19266596d6.45.2026.08.13.10.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2026 10:09:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wuYvR-00000003rjv-11eh; Thu, 13 Aug 2026 14:09:05 -0300 Date: Thu, 13 Aug 2026 14:09:05 -0300 From: Jason Gunthorpe To: Robin Murphy Cc: syzbot , 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 Message-ID: <20260813170905.GB905583@ziepe.ca> References: <6a7910da.9c11d2ce.289b96.00da.GAE@google.com> <68eebaf3-2427-48c0-93d3-87455ff266fb@arm.com> <20260810173230.GQ200537@ziepe.ca> <6f650cc2-b4fd-4305-b4d7-847ef935449a@arm.com> <20260811131154.GA544626@ziepe.ca> <317c8a9c-3b40-407d-bcf2-02b9be1b14b3@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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