[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <685cadaf.a00a0220.2e5631.01cf.GAE@google.com>
Date: Wed, 25 Jun 2025 19:17:19 -0700
From: syzbot <syzbot+9b9124ae9b12d5af5d95@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in
vmci_host_unlocked_ioctl (3)
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3)
Author: lizhi.xu@...driver.com
#syz test
diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index b64944367ac5..8bca943b9f4b 100644
--- a/drivers/misc/vmw_vmci/vmci_host.c
+++ b/drivers/misc/vmw_vmci/vmci_host.c
@@ -91,7 +91,7 @@ struct vmci_host_dev {
static struct vmci_ctx *host_context;
static bool vmci_host_device_initialized;
static atomic_t vmci_host_active_users = ATOMIC_INIT(0);
-
+static atomic_t vmci_host_dev_open = ATOMIC_INIT(0);
/*
* Determines whether the VMCI host personality is
* available. Since the core functionality of the host driver is
@@ -120,6 +120,11 @@ static int vmci_host_open(struct inode *inode, struct file *filp)
{
struct vmci_host_dev *vmci_host_dev;
+ if (atomic_inc_return(&vmci_host_dev_open) > 1) {
+ atomic_dec(&vmci_host_dev_open);
+ return -EBUSY;
+ }
+
vmci_host_dev = kzalloc(sizeof(struct vmci_host_dev), GFP_KERNEL);
if (vmci_host_dev == NULL)
return -ENOMEM;
Powered by blists - more mailing lists