public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+d31adfb277377ef8fcba@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] test uaf in iommufd_vfio_ioas
Date: Thu, 02 Nov 2023 18:18:07 -0700	[thread overview]
Message-ID: <000000000000e5d6a906093546db@google.com> (raw)
In-Reply-To: <00000000000055ef9a0609336580@google.com>

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/vfio_compat.c b/drivers/iommu/iommufd/vfio_compat.c
index 6c810bf80f99..85cff4489757 100644
--- a/drivers/iommu/iommufd/vfio_compat.c
+++ b/drivers/iommu/iommufd/vfio_compat.c
@@ -138,6 +138,8 @@ int iommufd_vfio_ioas(struct iommufd_ucmd *ucmd)
 
 	case IOMMU_VFIO_IOAS_SET:
 		ioas = iommufd_get_ioas(ucmd->ictx, cmd->ioas_id);
+		if (!ioas)
+			return -EINVAL;
 		if (IS_ERR(ioas))
 			return PTR_ERR(ioas);
 		xa_lock(&ucmd->ictx->objects);

  reply	other threads:[~2023-11-03  1:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 23:03 [syzbot] [iommu?] KASAN: slab-use-after-free Read in iommufd_vfio_ioas syzbot
2023-11-03  1:18 ` syzbot [this message]
2023-11-03  5:36 ` [syzbot] test uaf " syzbot
2023-11-03  7:09 ` syzbot
2023-11-03  7:58 ` syzbot

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=000000000000e5d6a906093546db@google.com \
    --to=syzbot+d31adfb277377ef8fcba@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.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