Messages in this thread Patch in this message | | | Date | Thu, 02 Nov 2023 22:36:44 -0700 | Subject | Re: [syzbot] test uaf in iommufd_vfio_ioas | From | syzbot <> |
| |
For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org.
***
Subject: test uaf in iommufd_vfio_ioas Author: lizhi.xu@windriver.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:
| |