{"id":"CVE-2022-49146","state":"PUBLISHED","title":"virtio: use virtio_device_ready() in virtio_device_restore()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirtio: use virtio_device_ready() in virtio_device_restore()\n\nAfter waking up a suspended VM, the kernel prints the following trace\nfor virtio drivers which do not directly call virtio_device_ready() in\nthe .restore:\n\n    PM: suspend exit\n    irq 22: nobody cared (try booting with the \"irqpoll\" option)\n    Call Trace:\n     <IRQ>\n     dump_stack_lvl+0x38/0x49\n     dump_stack+0x10/0x12\n     __report_bad_irq+0x3a/0xaf\n     note_interrupt.cold+0xb/0x60\n     handle_irq_event+0x71/0x80\n     handle_fasteoi_irq+0x95/0x1e0\n     __common_interrupt+0x6b/0x110\n     common_interrupt+0x63/0xe0\n     asm_common_interrupt+0x1e/0x40\n     ? __do_softirq+0x75/0x2f3\n     irq_exit_rcu+0x93/0xe0\n     sysvec_apic_timer_interrupt+0xac/0xd0\n     </IRQ>\n     <TASK>\n     asm_sysvec_apic_timer_interrupt+0x12/0x20\n     arch_cpu_idle+0x12/0x20\n     default_idle_call+0x39/0xf0\n     do_idle+0x1b5/0x210\n     cpu_startup_entry+0x20/0x30\n     start_secondary+0xf3/0x100\n     secondary_startup_64_no_verify+0xc3/0xcb\n     </TASK>\n    handlers:\n    [<000000008f9bac49>] vp_interrupt\n    [<000000008f9bac49>] vp_interrupt\n    Disabling IRQ #22\n\nThis happens because we don't invoke .enable_cbs callback in\nvirtio_device_restore(). That callback is used by some transports\n(e.g. virtio-pci) to enable interrupts.\n\nLet's fix it, by calling virtio_device_ready() as we do in\nvirtio_dev_probe(). This function calls .enable_cts callback and sets\nDRIVER_OK status bit.\n\nThis fix also avoids setting DRIVER_OK twice for those drivers that\ncall virtio_device_ready() in the .restore.","publishedAt":"2025-02-26T01:55:14.849Z","updatedAt":"2026-05-11T18:54:00.755Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"94e9f5da39ee5f8ea31be1585de31c54f10dedce","versionType":"git"},{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"4ae431113179d72c668b61df320af0c06d1aa5c5","versionType":"git"},{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio.c"]}],"references":["https://git.kernel.org/stable/c/94e9f5da39ee5f8ea31be1585de31c54f10dedce","https://git.kernel.org/stable/c/4ae431113179d72c668b61df320af0c06d1aa5c5","https://git.kernel.org/stable/c/8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49146.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49146","state":"PUBLISHED","datePublished":"2025-02-26T01:55:14.849Z","dateUpdated":"2026-05-11T18:54:00.755Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.270Z"},"containers":{"cna":{"title":"virtio: use virtio_device_ready() in virtio_device_restore()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirtio: use virtio_device_ready() in virtio_device_restore()\n\nAfter waking up a suspended VM, the kernel prints the following trace\nfor virtio drivers which do not directly call virtio_device_ready() in\nthe .restore:\n\n    PM: suspend exit\n    irq 22: nobody cared (try booting with the \"irqpoll\" option)\n    Call Trace:\n     <IRQ>\n     dump_stack_lvl+0x38/0x49\n     dump_stack+0x10/0x12\n     __report_bad_irq+0x3a/0xaf\n     note_interrupt.cold+0xb/0x60\n     handle_irq_event+0x71/0x80\n     handle_fasteoi_irq+0x95/0x1e0\n     __common_interrupt+0x6b/0x110\n     common_interrupt+0x63/0xe0\n     asm_common_interrupt+0x1e/0x40\n     ? __do_softirq+0x75/0x2f3\n     irq_exit_rcu+0x93/0xe0\n     sysvec_apic_timer_interrupt+0xac/0xd0\n     </IRQ>\n     <TASK>\n     asm_sysvec_apic_timer_interrupt+0x12/0x20\n     arch_cpu_idle+0x12/0x20\n     default_idle_call+0x39/0xf0\n     do_idle+0x1b5/0x210\n     cpu_startup_entry+0x20/0x30\n     start_secondary+0xf3/0x100\n     secondary_startup_64_no_verify+0xc3/0xcb\n     </TASK>\n    handlers:\n    [<000000008f9bac49>] vp_interrupt\n    [<000000008f9bac49>] vp_interrupt\n    Disabling IRQ #22\n\nThis happens because we don't invoke .enable_cbs callback in\nvirtio_device_restore(). That callback is used by some transports\n(e.g. virtio-pci) to enable interrupts.\n\nLet's fix it, by calling virtio_device_ready() as we do in\nvirtio_dev_probe(). This function calls .enable_cts callback and sets\nDRIVER_OK status bit.\n\nThis fix also avoids setting DRIVER_OK twice for those drivers that\ncall virtio_device_ready() in the .restore."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"94e9f5da39ee5f8ea31be1585de31c54f10dedce","versionType":"git"},{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"4ae431113179d72c668b61df320af0c06d1aa5c5","versionType":"git"},{"version":"d50497eb4e554e1f0351e1836ee7241c059592e6","status":"affected","lessThan":"8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/94e9f5da39ee5f8ea31be1585de31c54f10dedce"},{"url":"https://git.kernel.org/stable/c/4ae431113179d72c668b61df320af0c06d1aa5c5"},{"url":"https://git.kernel.org/stable/c/8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:54:00.755Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.16.19"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.17.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}