mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+9b9124ae9b12d5af5d95@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (3)
Date: Mon, 23 Jun 2025 20:29:37 +0800	[thread overview]
Message-ID: <tencent_C2882DF56C089420E9D2EC4ECD707B926F0A@qq.com> (raw)
In-Reply-To: <6854a3e6.a00a0220.137b3.0022.GAE@google.com>

#syz test

diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index b64944367ac5..4e500a8924c2 100644
--- a/drivers/misc/vmw_vmci/vmci_host.c
+++ b/drivers/misc/vmw_vmci/vmci_host.c
@@ -293,6 +293,8 @@ static int vmci_host_get_version(struct vmci_host_dev *vmci_host_dev,
 #define vmci_ioctl_err(fmt, ...)	\
 	pr_devel("%s: " fmt, ioctl_name, ##__VA_ARGS__)
 
+static DEFINE_MUTEX(init_rec_mutex);
+
 static int vmci_host_do_init_context(struct vmci_host_dev *vmci_host_dev,
 				     const char *ioctl_name,
 				     void __user *uptr)
@@ -922,7 +924,9 @@ static long vmci_host_unlocked_ioctl(struct file *filp,
 
 	struct vmci_host_dev *vmci_host_dev = filp->private_data;
 	void __user *uptr = (void __user *)ioarg;
+	int ret = 0;
 
+	mutex_lock(&init_rec_mutex);
 	switch (iocmd) {
 	case IOCTL_VMCI_INIT_CONTEXT:
 		VMCI_DO_IOCTL(INIT_CONTEXT, init_context);
@@ -957,13 +961,16 @@ static long vmci_host_unlocked_ioctl(struct file *filp,
 
 	case IOCTL_VMCI_VERSION:
 	case IOCTL_VMCI_VERSION2:
-		return vmci_host_get_version(vmci_host_dev, iocmd, uptr);
+		ret = vmci_host_get_version(vmci_host_dev, iocmd, uptr);
 
 	default:
 		pr_devel("%s: Unknown ioctl (iocmd=%d)\n", __func__, iocmd);
-		return -EINVAL;
+		ret -EINVAL;
 	}
 
+	mutex_unlock(&init_rec_mutex);
+	return ret;
+
 #undef VMCI_DO_IOCTL
 }
 


  parent reply	other threads:[~2025-06-23 12:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 23:57 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 [this message]
2025-06-23 13:45   ` syzbot
2025-06-26  2:17 ` [syzbot] " syzbot
2025-06-26  2:49 ` 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
     [not found] <20250620010300.3380487-1-lizhi.xu@windriver.com>
2025-06-20  2:55 ` syzbot
     [not found] <20250620042056.1099990-1-lizhi.xu@windriver.com>
2025-06-20  4:28 ` syzbot
     [not found] <20250620052310.1280771-1-lizhi.xu@windriver.com>
2025-06-20  5:58 ` syzbot
     [not found] <20250620065230.1552640-1-lizhi.xu@windriver.com>
2025-06-20  8:49 ` syzbot
     [not found] <20250620065432.1558000-1-lizhi.xu@windriver.com>
2025-06-20 10:02 ` syzbot
     [not found] <20250623030312.2337101-1-lizhi.xu@windriver.com>
2025-06-23  4:28 ` syzbot
     [not found] <20250623080347.3056823-1-lizhi.xu@windriver.com>
2025-06-23  8:36 ` syzbot
     [not found] <20250623085022.3182174-1-lizhi.xu@windriver.com>
2025-06-23  9:28 ` syzbot
     [not found] <20250623094537.3353300-1-lizhi.xu@windriver.com>
2025-06-23 12:11 ` syzbot
     [not found] <20250626021712.2842722-1-lizhi.xu@windriver.com>
2025-06-26  3:35 ` syzbot
     [not found] <20250626024902.2942685-1-lizhi.xu@windriver.com>
2025-06-26  4:45 ` syzbot
     [not found] <20250627032632.2470249-1-lizhi.xu@windriver.com>
2025-06-27  4:54 ` syzbot
     [not found] <20250627051303.2837086-1-lizhi.xu@windriver.com>
2025-06-27  5:44 ` syzbot
     [not found] <20250703080919.1229530-1-lizhi.xu@windriver.com>
2025-07-03 10:12 ` 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=tencent_C2882DF56C089420E9D2EC4ECD707B926F0A@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9b9124ae9b12d5af5d95@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®