{"id":"CVE-2026-143330","state":"PUBLISHED","title":"vhost-vdpa: drop the parent's vq callback before the call fd is released","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvhost-vdpa: drop the parent's vq callback before the call fd is released\n\nVHOST_SET_VRING_CALL releases the previous call eventfd inside\nvhost_vring_ioctl() -- it swaps the new context into vq->call_ctx.ctx\nand then eventfd_ctx_put()s the old one, which is a synchronous\nkfree(). The parent vdpa device is only told about the change\nafterwards, when vhost_vdpa_vring_ioctl() reaches ops->set_vq_cb().\n\nParent drivers cache the pointer handed to them in\nvdpa_callback::trigger and do not take a reference on it, so\nthroughout that window the parent holds a dangling eventfd_ctx and may\nsignal it. The documentation added with the field describes what\nsignalling it means but says nothing about how long it stays valid.\n\nThis is the same hazard that \"vhost_vdpa: assign irq bypass producer\ntoken correctly\" addressed for the irq bypass producer token, by\nmoving vhost_vdpa_unsetup_vq_irq() ahead of the vhost_vring_ioctl()\ncall. The producer token was only one of the two consumers of that\npointer; the one the parent keeps via ->set_vq_cb() was left behind\nthe free.\n\nWith VDUSE the window is directly reachable from userspace, because\nthe device emulation daemon can inject an interrupt at any time from a\ndifferent fd, and neither side shares a lock with the other: VDUSE\ntakes vq->irq_lock, vhost takes vhost_dev.mutex + vq->mutex.\n\n  BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x76/0xe0\n  Write of size 4 at addr ffff8881084e8788 by task vduse_uaf/2987\n\n  _raw_spin_lock_irqsave+0x76/0xe0\n  eventfd_signal_mask+0x69/0x120\n  vduse_dev_ioctl+0x337/0x1a60     <- vduse_vq_signal_irqfd(), inlined\n  __x64_sys_ioctl+0x120/0x170      <- VDUSE_VQ_INJECT_IRQ\n\n  Allocated by task 2986:\n   do_eventfd+0x50/0x200\n   __x64_sys_eventfd2+0x2e/0x40\n\n  kmalloc-64, freed 64-byte region [ffff8881084e8780, ffff8881084e87c0)\n\nOne thread loops VHOST_SET_VRING_CALL on /dev/vhost-vdpa-N with a\nfresh eventfd and then unbinds it, while another loops\nVDUSE_VQ_INJECT_IRQ on /dev/vduse/<name>. This reproduces in 5 out of\n5 ten-second runs on v7.1.6 and 3 out of 3 on v7.2-rc6. With the patch\nthere are no reports in 3 out of 3 runs on either, while the same\nworkload still gets ~30000 interrupts per run delivered into live\neventfds, so the path is still being exercised.\n\nTell the parent to drop the callback before vhost_vring_ioctl() can\nfree the eventfd, mirroring what is already done for the bypass\nproducer, and restore it if the ioctl fails -- on failure the swap\nnever happened, the old context is still installed, and leaving the\nparent without a callback would silently drop that vq's interrupts.\n\nClearing the callback only stops a parent from starting to use the\ncontext; a handler that already loaded it can still be running. For\nparents with a real interrupt, wait for it with synchronize_irq() on\nthe vq's irq. VDUSE does not implement get_vq_irq, so that case stays\ncovered by the teardown above.","publishedAt":"2026-12-03T09:21:54.920Z","updatedAt":"2026-12-03T09:21:54.920Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"d858ed79baa30067df6fafcbc794da9afedbe9b6","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"c906bc29f4caf64546b042a563e9853b2d9f6b0e","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"3cb11ec94e2476feee0ce108091b44954da74ace","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d","versionType":"git"},{"version":"10348fb6feae4455be908e668ae65eb4aba118fc","status":"affected","versionType":"git"},{"version":"4d10104d987ae1a1d277111fef1c7244dc9a19d2","status":"affected","versionType":"git"},{"version":"5d63cbf47391b448b2fde565fe04b0a7a5b808a0","status":"affected","versionType":"git"},{"version":"5.10.227","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.168","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.113","status":"affected","lessThan":"6.2","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vhost/vdpa.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vhost/vdpa.c"]}],"references":["https://git.kernel.org/stable/c/d858ed79baa30067df6fafcbc794da9afedbe9b6","https://git.kernel.org/stable/c/c906bc29f4caf64546b042a563e9853b2d9f6b0e","https://git.kernel.org/stable/c/3cb11ec94e2476feee0ce108091b44954da74ace","https://git.kernel.org/stable/c/c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143330.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143330","state":"PUBLISHED","datePublished":"2026-12-03T09:21:54.920Z","dateUpdated":"2026-12-03T09:21:54.920Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.367Z"},"containers":{"cna":{"title":"vhost-vdpa: drop the parent's vq callback before the call fd is released","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvhost-vdpa: drop the parent's vq callback before the call fd is released\n\nVHOST_SET_VRING_CALL releases the previous call eventfd inside\nvhost_vring_ioctl() -- it swaps the new context into vq->call_ctx.ctx\nand then eventfd_ctx_put()s the old one, which is a synchronous\nkfree(). The parent vdpa device is only told about the change\nafterwards, when vhost_vdpa_vring_ioctl() reaches ops->set_vq_cb().\n\nParent drivers cache the pointer handed to them in\nvdpa_callback::trigger and do not take a reference on it, so\nthroughout that window the parent holds a dangling eventfd_ctx and may\nsignal it. The documentation added with the field describes what\nsignalling it means but says nothing about how long it stays valid.\n\nThis is the same hazard that \"vhost_vdpa: assign irq bypass producer\ntoken correctly\" addressed for the irq bypass producer token, by\nmoving vhost_vdpa_unsetup_vq_irq() ahead of the vhost_vring_ioctl()\ncall. The producer token was only one of the two consumers of that\npointer; the one the parent keeps via ->set_vq_cb() was left behind\nthe free.\n\nWith VDUSE the window is directly reachable from userspace, because\nthe device emulation daemon can inject an interrupt at any time from a\ndifferent fd, and neither side shares a lock with the other: VDUSE\ntakes vq->irq_lock, vhost takes vhost_dev.mutex + vq->mutex.\n\n  BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x76/0xe0\n  Write of size 4 at addr ffff8881084e8788 by task vduse_uaf/2987\n\n  _raw_spin_lock_irqsave+0x76/0xe0\n  eventfd_signal_mask+0x69/0x120\n  vduse_dev_ioctl+0x337/0x1a60     <- vduse_vq_signal_irqfd(), inlined\n  __x64_sys_ioctl+0x120/0x170      <- VDUSE_VQ_INJECT_IRQ\n\n  Allocated by task 2986:\n   do_eventfd+0x50/0x200\n   __x64_sys_eventfd2+0x2e/0x40\n\n  kmalloc-64, freed 64-byte region [ffff8881084e8780, ffff8881084e87c0)\n\nOne thread loops VHOST_SET_VRING_CALL on /dev/vhost-vdpa-N with a\nfresh eventfd and then unbinds it, while another loops\nVDUSE_VQ_INJECT_IRQ on /dev/vduse/<name>. This reproduces in 5 out of\n5 ten-second runs on v7.1.6 and 3 out of 3 on v7.2-rc6. With the patch\nthere are no reports in 3 out of 3 runs on either, while the same\nworkload still gets ~30000 interrupts per run delivered into live\neventfds, so the path is still being exercised.\n\nTell the parent to drop the callback before vhost_vring_ioctl() can\nfree the eventfd, mirroring what is already done for the bypass\nproducer, and restore it if the ioctl fails -- on failure the swap\nnever happened, the old context is still installed, and leaving the\nparent without a callback would silently drop that vq's interrupts.\n\nClearing the callback only stops a parent from starting to use the\ncontext; a handler that already loaded it can still be running. For\nparents with a real interrupt, wait for it with synchronize_irq() on\nthe vq's irq. VDUSE does not implement get_vq_irq, so that case stays\ncovered by the teardown above."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"d858ed79baa30067df6fafcbc794da9afedbe9b6","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"c906bc29f4caf64546b042a563e9853b2d9f6b0e","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"3cb11ec94e2476feee0ce108091b44954da74ace","versionType":"git"},{"version":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a","status":"affected","lessThan":"c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d","versionType":"git"},{"version":"10348fb6feae4455be908e668ae65eb4aba118fc","status":"affected","versionType":"git"},{"version":"4d10104d987ae1a1d277111fef1c7244dc9a19d2","status":"affected","versionType":"git"},{"version":"5d63cbf47391b448b2fde565fe04b0a7a5b808a0","status":"affected","versionType":"git"},{"version":"5.10.227","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.168","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.113","status":"affected","lessThan":"6.2","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vhost/vdpa.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vhost/vdpa.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d858ed79baa30067df6fafcbc794da9afedbe9b6"},{"url":"https://git.kernel.org/stable/c/c906bc29f4caf64546b042a563e9853b2d9f6b0e"},{"url":"https://git.kernel.org/stable/c/3cb11ec94e2476feee0ce108091b44954da74ace"},{"url":"https://git.kernel.org/stable/c/c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:21:54.920Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.4-rc2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.168"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.113"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}