From: Jason Gunthorpe <jgg@nvidia.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: alex.williamson@redhat.com, kevin.tian@intel.com,
yi.l.liu@intel.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio: Fix NULL pointer dereference caused by uninitialized group->iommufd
Date: Wed, 22 Feb 2023 08:58:30 -0400 [thread overview]
Message-ID: <Y/YRdkUQPG8Mli1H@nvidia.com> (raw)
In-Reply-To: <20230222074938.13681-1-yan.y.zhao@intel.com>
On Wed, Feb 22, 2023 at 03:49:38PM +0800, Yan Zhao wrote:
> group->iommufd is not initialized for the iommufd_ctx_put()
>
> [20018.331541] BUG: kernel NULL pointer dereference, address: 0000000000000000
> [20018.377508] RIP: 0010:iommufd_ctx_put+0x5/0x10 [iommufd]
> ...
> [20018.476483] Call Trace:
> [20018.479214] <TASK>
> [20018.481555] vfio_group_fops_unl_ioctl+0x506/0x690 [vfio]
> [20018.487586] __x64_sys_ioctl+0x6a/0xb0
> [20018.491773] ? trace_hardirqs_on+0xc5/0xe0
> [20018.496347] do_syscall_64+0x67/0x90
> [20018.500340] entry_SYSCALL_64_after_hwframe+0x4b/0xb5
>
> Fixes: 9eefba8002c2 ("vfio: Move vfio group specific code into group.c")
> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
> ---
> drivers/vfio/group.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2023-02-22 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 7:49 [PATCH] vfio: Fix NULL pointer dereference caused by uninitialized group->iommufd Yan Zhao
2023-02-22 9:18 ` Miko Larsson
2023-02-22 9:25 ` Liu, Yi L
2023-02-22 12:58 ` Jason Gunthorpe [this message]
2023-02-22 17:59 ` Alex Williamson
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=Y/YRdkUQPG8Mli1H@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yan.y.zhao@intel.com \
--cc=yi.l.liu@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.