{"id":"CVE-2026-98841","state":"PUBLISHED","title":"virt: vmgenid: set driver_data before registering notification handlers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirt: vmgenid: set driver_data before registering notification handlers\n\nBoth probe paths register their notification handler before assigning\ndriver_data, which the handler dereferences.\n\nIn the devicetree path, the notification IRQ can fire as soon as\ndevm_request_irq() registers the handler: the interrupt may already be\npending at probe time, for example when a VMM injects the\ngeneration-changed notification while restoring a guest from a snapshot\nthat was taken before the driver had probed (Firecracker does exactly\nthis on snapshot restore). The IRQ is also requested with IRQF_SHARED,\nso another device sharing the line can trigger the handler just as\nearly. The handler then calls vmgenid_notify(), which dereferences the\nstill-NULL driver_data and panics:\n\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010\n  CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.38+ #1 PREEMPT(none)\n  Hardware name: linux,dummy-virt (DT)\n  pc : vmgenid_notify.isra.0+0x24/0x8c\n  lr : vmgenid_of_irq_handler+0x14/0x34\n  Call trace:\n   vmgenid_notify.isra.0+0x24/0x8c (P)\n   vmgenid_of_irq_handler+0x14/0x34\n   __handle_irq_event_percpu+0x44/0x1bc\n   handle_irq_event+0x4c/0xb4\n   handle_fasteoi_irq+0xf8/0x1f8\n\nThe ACPI path has the same ordering problem: the handler is installed\nwith acpi_install_notify_handler() before driver_data is assigned.\nACPI notifications are dispatched asynchronously from a workqueue, so\nthe window is narrow, but a notification arriving between the two calls\nhits the same NULL dereference.\n\nAssign driver_data before registering the handlers. The state is fully\ninitialized at that point, so the handlers are safe to run. Should\nregistration fail, the probe error path leaves no dangling pointer\nbehind: the driver core clears driver_data in device_unbind_cleanup().","publishedAt":"2026-10-18T15:50:15.224Z","updatedAt":"2026-10-19T09:26:33.492Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"538fe5efaa9704ad820ba34b4f9df135ca873d79","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"7a1e8daeaa466c6aaffa223e1afe9cfeece0dd47","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"8f42954ad8bf9bdbf574f2c437ad30cb2601f401","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"9f8139c6145cf17d690d6c414d43b4c0bef632fb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virt/vmgenid.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.56","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.10","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virt/vmgenid.c"]}],"references":["https://git.kernel.org/stable/c/538fe5efaa9704ad820ba34b4f9df135ca873d79","https://git.kernel.org/stable/c/7a1e8daeaa466c6aaffa223e1afe9cfeece0dd47","https://git.kernel.org/stable/c/8f42954ad8bf9bdbf574f2c437ad30cb2601f401","https://git.kernel.org/stable/c/9f8139c6145cf17d690d6c414d43b4c0bef632fb"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98841.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98841","state":"PUBLISHED","datePublished":"2026-10-18T15:50:15.224Z","dateUpdated":"2026-10-19T09:26:33.492Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.373Z"},"containers":{"cna":{"title":"virt: vmgenid: set driver_data before registering notification handlers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirt: vmgenid: set driver_data before registering notification handlers\n\nBoth probe paths register their notification handler before assigning\ndriver_data, which the handler dereferences.\n\nIn the devicetree path, the notification IRQ can fire as soon as\ndevm_request_irq() registers the handler: the interrupt may already be\npending at probe time, for example when a VMM injects the\ngeneration-changed notification while restoring a guest from a snapshot\nthat was taken before the driver had probed (Firecracker does exactly\nthis on snapshot restore). The IRQ is also requested with IRQF_SHARED,\nso another device sharing the line can trigger the handler just as\nearly. The handler then calls vmgenid_notify(), which dereferences the\nstill-NULL driver_data and panics:\n\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010\n  CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.38+ #1 PREEMPT(none)\n  Hardware name: linux,dummy-virt (DT)\n  pc : vmgenid_notify.isra.0+0x24/0x8c\n  lr : vmgenid_of_irq_handler+0x14/0x34\n  Call trace:\n   vmgenid_notify.isra.0+0x24/0x8c (P)\n   vmgenid_of_irq_handler+0x14/0x34\n   __handle_irq_event_percpu+0x44/0x1bc\n   handle_irq_event+0x4c/0xb4\n   handle_fasteoi_irq+0xf8/0x1f8\n\nThe ACPI path has the same ordering problem: the handler is installed\nwith acpi_install_notify_handler() before driver_data is assigned.\nACPI notifications are dispatched asynchronously from a workqueue, so\nthe window is narrow, but a notification arriving between the two calls\nhits the same NULL dereference.\n\nAssign driver_data before registering the handlers. The state is fully\ninitialized at that point, so the handlers are safe to run. Should\nregistration fail, the probe error path leaves no dangling pointer\nbehind: the driver core clears driver_data in device_unbind_cleanup()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"538fe5efaa9704ad820ba34b4f9df135ca873d79","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"7a1e8daeaa466c6aaffa223e1afe9cfeece0dd47","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"8f42954ad8bf9bdbf574f2c437ad30cb2601f401","versionType":"git"},{"version":"e07606713a908eee8099883c8c830ebe33aaf748","status":"affected","lessThan":"9f8139c6145cf17d690d6c414d43b4c0bef632fb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virt/vmgenid.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.56","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.10","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virt/vmgenid.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/538fe5efaa9704ad820ba34b4f9df135ca873d79"},{"url":"https://git.kernel.org/stable/c/7a1e8daeaa466c6aaffa223e1afe9cfeece0dd47"},{"url":"https://git.kernel.org/stable/c/8f42954ad8bf9bdbf574f2c437ad30cb2601f401"},{"url":"https://git.kernel.org/stable/c/9f8139c6145cf17d690d6c414d43b4c0bef632fb"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:26:33.492Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.12.113"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.18.56"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"7.2.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}