[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000ce1903060938e365@google.com>
Date: Thu, 02 Nov 2023 22:36:44 -0700
From: syzbot <syzbot+d31adfb277377ef8fcba@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] test uaf in iommufd_vfio_ioas
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: test uaf in iommufd_vfio_ioas
Author: lizhi.xu@...driver.com
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2af9b20dbb39
diff --git a/drivers/iommu/iommufd/main.c b/drivers/iommu/iommufd/main.c
index e71523cbd0de..e89c90784536 100644
--- a/drivers/iommu/iommufd/main.c
+++ b/drivers/iommu/iommufd/main.c
@@ -159,7 +159,8 @@ static struct iommufd_object *iommufd_object_remove(struct iommufd_ctx *ictx,
}
xas_store(&xas, NULL);
- if (ictx->vfio_ioas == container_of(obj, struct iommufd_ioas, obj))
+ __xa_erase(&ictx->objects, obj->id);
+ if (ictx->vfio_ioas && &ictx->vfio_ioas->obj == obj)
ictx->vfio_ioas = NULL;
out_xa:
Powered by blists - more mailing lists