All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+9b9124ae9b12d5af5d95@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3)
Date: Wed, 25 Jun 2025 19:17:19 -0700	[thread overview]
Message-ID: <685cadaf.a00a0220.2e5631.01cf.GAE@google.com> (raw)
In-Reply-To: <6854a3e6.a00a0220.137b3.0022.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3)
Author: lizhi.xu@windriver.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;

  parent reply	other threads:[~2025-06-26  2:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 23:57 [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3) syzbot
2025-06-20  1:03 ` [syzbot] " syzbot
2025-06-20  4:21 ` syzbot
2025-06-20  5:23 ` syzbot
2025-06-20  6:52 ` syzbot
2025-06-20  6:54 ` syzbot
2025-06-22  2:37 ` Edward Adam Davis
2025-06-22  3:02   ` syzbot
2025-06-22  4:46 ` Hillf Danton
2025-06-22  5:19   ` syzbot
2025-06-22  6:28 ` Hillf Danton
2025-06-22  7:32   ` syzbot
2025-06-23  3:03 ` [syzbot] " syzbot
2025-06-23  8:03 ` syzbot
2025-06-23  8:50 ` syzbot
2025-06-23  9:45 ` syzbot
2025-06-23 12:29 ` Edward Adam Davis
2025-06-23 13:45   ` syzbot
2025-06-26  2:17 ` syzbot [this message]
2025-06-26  2:49 ` [syzbot] " syzbot
2025-06-27  3:26 ` syzbot
2025-06-27  5:13 ` syzbot
2025-06-27  5:52 ` [PATCH] vmci: Prevent the dispatching of uninitialized payloads Lizhi Xu
2025-07-03  7:53   ` [PATCH V2] " Lizhi Xu
2025-07-03  8:09 ` [syzbot] Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3) 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=685cadaf.a00a0220.2e5631.01cf.GAE@google.com \
    --to=syzbot+9b9124ae9b12d5af5d95@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 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.