From: Pranjal Shrivastava <praan@google.com>
To: Baolu Lu <baolu.lu@linux.intel.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Kevin Tian <kevin.tian@intel.com>,
Samiullah Khawaja <skhawaja@google.com>,
sashiko-bot@kernel.org
Subject: Re: [PATCH 2/2] iommu/vt-d: Fix Use-After-Free in probe error path
Date: Sun, 31 May 2026 17:03:40 +0000 [thread overview]
Message-ID: <ahxp7CxM4kbTMgxy@google.com> (raw)
In-Reply-To: <fa33f355-a21d-4d6c-ad45-c2bd455a9eab@linux.intel.com>
On Sat, May 30, 2026 at 09:33:12PM +0800, Baolu Lu wrote:
> On 5/29/2026 7:34 PM, Pranjal Shrivastava wrote:
> > When intel_iommu_probe_device() fails after the info structure has
> > been linked to the device via dev_iommu_priv_set(), the error path
> > calls kfree(info) but does not clear the pointer in the device
> > structure.
> >
> > This results in a Use-After-Free regression if the pointer is accessed
> > by a subsequent IOMMU core call or a re-probe.
> >
> > Fix this by ensuring dev_iommu_priv_set(dev, NULL) is called before
> > freeing the info structure in the error path.
> >
> > Fixes: 89436f4f5412 ("iommu/vt-d: Fix WARN_ON in iommu probe path")
>
> Fixes: eda1a94caf6b ("iommu: Mark dev_iommu_priv_set() with a lockdep")
Ack. Sending a v2 with this.
Thanks,
Praan
prev parent reply other threads:[~2026-05-31 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 11:34 [PATCH 0/2] iommu/vt-d: Fix issues on probe error path Pranjal Shrivastava
2026-05-29 11:34 ` [PATCH 1/2] iommu/vt-d: Fix RB-tree corruption in " Pranjal Shrivastava
2026-05-29 11:34 ` [PATCH 2/2] iommu/vt-d: Fix Use-After-Free " Pranjal Shrivastava
2026-05-30 13:33 ` Baolu Lu
2026-05-31 17:03 ` Pranjal Shrivastava [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=ahxp7CxM4kbTMgxy@google.com \
--to=praan@google.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=sashiko-bot@kernel.org \
--cc=skhawaja@google.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