{"id":"CVE-2026-143330","summary":"vhost-vdpa: drop the parent's vq callback before the call fd is released","details":"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-\u003ecall_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-\u003eset_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 -\u003eset_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-\u003eirq_lock, vhost takes vhost_dev.mutex + vq-\u003emutex.\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     \u003c- vduse_vq_signal_irqfd(), inlined\n  __x64_sys_ioctl+0x120/0x170      \u003c- 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/\u003cname\u003e. 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.","modified":"2026-12-03T11:02:02.079211705Z","published":"2026-12-03T09:21:54.920Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143330.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3cb11ec94e2476feee0ce108091b44954da74ace"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c906bc29f4caf64546b042a563e9853b2d9f6b0e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d858ed79baa30067df6fafcbc794da9afedbe9b6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143330.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143330"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5e68470f4e80a4120e9ecec408f6ab4ad386bd4a"},{"fixed":"d858ed79baa30067df6fafcbc794da9afedbe9b6"},{"fixed":"c906bc29f4caf64546b042a563e9853b2d9f6b0e"},{"fixed":"3cb11ec94e2476feee0ce108091b44954da74ace"},{"fixed":"c9c1c1b7b31fc8b9a5d6c04f5f0ae647d081a39d"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"10348fb6feae4455be908e668ae65eb4aba118fc"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4d10104d987ae1a1d277111fef1c7244dc9a19d2"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5d63cbf47391b448b2fde565fe04b0a7a5b808a0"}]}],"versions":["v5.10.276","v5.10.275","v5.10.274","v5.10.273","v5.10.272","v5.10.271","v5.10.270","v5.10.269","v5.10.268","v5.10.267","v5.10.266","v5.10.265","v5.10.264","v5.10.263","v5.10.262","v5.10.261","v5.10.260","v5.10.259","v5.10.258","v5.10.257","v5.10.256","v5.10.255","v5.10.254","v5.10.253","v5.10.252","v5.10.251","v5.10.250","v5.10.249","v5.10.248","v5.10.247","v5.10.246","v5.10.245","v5.10.244","v5.10.243","v5.10.242","v5.10.241","v5.10.240","v5.10.239","v5.10.238","v5.10.237","v5.10.236","v5.10.235","v5.10.234","v5.10.233","v5.10.232","v5.10.231","v5.10.230","v5.10.229","v5.10.228","v5.10.227","v5.15.227","v5.15.226","v5.15.225","v5.15.224","v5.15.223","v5.15.222","v5.15.221","v5.15.220","v5.15.219","v5.15.218","v5.15.217","v5.15.216","v5.15.215","v5.15.214","v5.15.213","v5.15.212","v5.15.211","v5.15.210","v5.15.209","v5.15.208","v5.15.207","v5.15.206","v5.15.205","v5.15.204","v5.15.203","v5.15.202","v5.15.201","v5.15.200","v5.15.199","v5.15.198","v5.15.197","v5.15.196","v5.15.195","v5.15.194","v5.15.193","v5.15.192","v5.15.191","v5.15.190","v5.15.189","v5.15.188","v5.15.187","v5.15.186","v5.15.185","v5.15.184","v5.15.183","v5.15.182","v5.15.181","v5.15.180","v5.15.179","v5.15.178","v5.15.177","v5.15.176","v5.15.175","v5.15.174","v5.15.173","v5.15.172","v5.15.171","v5.15.170","v5.15.169","v5.15.168","v6.1.193","v6.1.192","v6.1.191","v6.1.190","v6.1.189","v6.1.188","v6.1.187","v6.1.186","v6.1.185","v6.1.184","v6.1.183","v6.1.182","v6.1.181","v6.1.180","v6.1.179","v6.1.178","v6.1.177","v6.1.176","v6.1.175","v6.1.174","v6.1.173","v6.1.172","v6.1.171","v6.1.170","v6.1.169","v6.1.168","v6.1.167","v6.1.166","v6.1.165","v6.1.164","v6.1.163","v6.1.162","v6.1.161","v6.1.160","v6.1.159","v6.1.158","v6.1.157","v6.1.156","v6.1.155","v6.1.154","v6.1.153","v6.1.152","v6.1.151","v6.1.150","v6.1.149","v6.1.148","v6.1.147","v6.1.146","v6.1.145","v6.1.144","v6.1.143","v6.1.142","v6.1.141","v6.1.140","v6.1.139","v6.1.138","v6.1.137","v6.1.136","v6.1.135","v6.1.134","v6.1.133","v6.1.132","v6.1.131","v6.1.130","v6.1.129","v6.1.128","v6.1.127","v6.1.126","v6.1.125","v6.1.124","v6.1.123","v6.1.122","v6.1.121","v6.1.120","v6.1.119","v6.1.118","v6.1.117","v6.1.116","v6.1.115","v6.1.114","v6.1.113"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143330.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.227"},{"fixed":"5.11"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.168"},{"fixed":"5.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.113"},{"fixed":"6.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.4.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143330.json"}}],"schema_version":"1.9.2"}