{"id":"CVE-2024-46830","aliases":["CVE-2024-46830"],"related":[],"kind":"vulnerability","state":"published","title":"KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS\n\nGrab kvm->srcu when processing KVM_SET_VCPU_EVENTS, as KVM will forcibly\nleave nested VMX/SVM if SMM mode is being toggled, and leaving nested VMX\nreads guest memory.\n\nNote, kvm_vcpu_ioctl_x86_set_vcpu_events() can also be called from KVM_RUN\nvia sync_regs(), which already holds SRCU.  I.e. trying to precisely use\nkvm_vcpu_srcu_read_lock() around the problematic SMM code would cause\nproblems.  Acquiring SRCU isn't all that expensive, so for simplicity,\ngrab it unconditionally for KVM_SET_VCPU_EVENTS.\n\n =============================\n WARNING: suspicious RCU usage\n 6.10.0-rc7-332d2c1d713e-next-vm #552 Not tainted\n -----------------------------\n include/linux/kvm_host.h:1027 suspicious rcu_dereference_check() usage!\n\n other info that might help us debug this:\n\n rcu_scheduler_active = 2, debug_locks = 1\n 1 lock held by repro/1071:\n  #0: ffff88811e424430 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x7d/0x970 [kvm]\n\n stack backtrace:\n CPU: 15 PID: 1071 Comm: repro Not tainted 6.10.0-rc7-332d2c1d713e-next-vm #552\n Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015\n Call Trace:\n  <TASK>\n  dump_stack_lvl+0x7f/0x90\n  lockdep_rcu_suspicious+0x13f/0x1a0\n  kvm_vcpu_gfn_to_memslot+0x168/0x190 [kvm]\n  kvm_vcpu_read_guest+0x3e/0x90 [kvm]\n  nested_vmx_load_msr+0x6b/0x1d0 [kvm_intel]\n  load_vmcs12_host_state+0x432/0xb40 [kvm_intel]\n  vmx_leave_nested+0x30/0x40 [kvm_intel]\n  kvm_vcpu_ioctl_x86_set_vcpu_events+0x15d/0x2b0 [kvm]\n  kvm_arch_vcpu_ioctl+0x1107/0x1750 [kvm]\n  ? mark_held_locks+0x49/0x70\n  ? kvm_vcpu_ioctl+0x7d/0x970 [kvm]\n  ? kvm_vcpu_ioctl+0x497/0x970 [kvm]\n  kvm_vcpu_ioctl+0x497/0x970 [kvm]\n  ? lock_acquire+0xba/0x2d0\n  ? find_held_lock+0x2b/0x80\n  ? do_user_addr_fault+0x40c/0x6f0\n  ? lock_release+0xb7/0x270\n  __x64_sys_ioctl+0x82/0xb0\n  do_syscall_64+0x6c/0x170\n  entry_SYSCALL_64_after_hwframe+0x4b/0x53\n RIP: 0033:0x7ff11eb1b539\n  </TASK>","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS\n\nGrab kvm->srcu when processing KVM_SET_VCPU_EVENTS, as KVM will forcibly\nleave nested VMX/SVM if SMM mode is being toggled, and leaving nested VMX\nreads guest memory.\n\nNote, kvm_vcpu_ioctl_x86_set_vcpu_events() can also be called from KVM_RUN\nvia sync_regs(), which already holds SRCU.  I.e. trying to precisely use\nkvm_vcpu_srcu_read_lock() around the problematic SMM code would cause\nproblems.  Acquiring SRCU isn't all that expensive, so for simplicity,\ngrab it unconditionally for KVM_SET_VCPU_EVENTS.\n\n =============================\n WARNING: suspicious RCU usage\n 6.10.0-rc7-332d2c1d713e-next-vm #552 Not tainted\n -----------------------------\n include/linux/kvm_host.h:1027 suspicious rcu_dereference_check() usage!\n\n other info that might help us debug this:\n\n rcu_scheduler_active = 2, debug_locks = 1\n 1 lock held by repro/1071:\n  #0: ffff88811e424430 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x7d/0x970 [kvm]\n\n stack backtrace:\n CPU: 15 PID: 1071 Comm: repro Not tainted 6.10.0-rc7-332d2c1d713e-next-vm #552\n Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015\n Call Trace:\n  <TASK>\n  dump_stack_lvl+0x7f/0x90\n  lockdep_rcu_suspicious+0x13f/0x1a0\n  kvm_vcpu_gfn_to_memslot+0x168/0x190 [kvm]\n  kvm_vcpu_read_guest+0x3e/0x90 [kvm]\n  nested_vmx_load_msr+0x6b/0x1d0 [kvm_intel]\n  load_vmcs12_host_state+0x432/0xb40 [kvm_intel]\n  vmx_leave_nested+0x30/0x40 [kvm_intel]\n  kvm_vcpu_ioctl_x86_set_vcpu_events+0x15d/0x2b0 [kvm]\n  kvm_arch_vcpu_ioctl+0x1107/0x1750 [kvm]\n  ? mark_held_locks+0x49/0x70\n  ? kvm_vcpu_ioctl+0x7d/0x970 [kvm]\n  ? kvm_vcpu_ioctl+0x497/0x970 [kvm]\n  kvm_vcpu_ioctl+0x497/0x970 [kvm]\n  ? lock_acquire+0xba/0x2d0\n  ? find_held_lock+0x2b/0x80\n  ? do_user_addr_fault+0x40c/0x6f0\n  ? lock_release+0xb7/0x270\n  __x64_sys_ioctl+0x82/0xb0\n  do_syscall_64+0x6c/0x170\n  entry_SYSCALL_64_after_hwframe+0x4b/0x53\n RIP: 0033:0x7ff11eb1b539\n  </TASK>","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: KVM: x86: Adquirir kvm-&gt;srcu al manejar KVM_SET_VCPU_EVENTS Adquiera kvm-&gt;srcu al procesar KVM_SET_VCPU_EVENTS, ya que KVM abandonará a la fuerza el VMX/SVM anidado si se alterna el modo SMM, y al abandonar el VMX anidado se lee la memoria del invitado. Tenga en cuenta que kvm_vcpu_ioctl_x86_set_vcpu_events() también se puede llamar desde KVM_RUN a través de sync_regs(), que ya contiene SRCU. Es decir, intentar usar con precisión kvm_vcpu_srcu_read_lock() alrededor del código SMM problemático causaría problemas. Adquirir SRCU no es tan caro, así que para simplificar, tómelo incondicionalmente para KVM_SET_VCPU_EVENTS. ============================= ADVERTENCIA: uso sospechoso de RCU 6.10.0-rc7-332d2c1d713e-next-vm #552 No contaminado ----------------------------- include/linux/kvm_host.h:1027 ¡Uso sospechoso de rcu_dereference_check()! Otra información que podría ayudarnos a depurar esto: rcu_scheduler_active = 2, debug_locks = 1 1 bloqueo retenido por repro/1071: #0: ffff88811e424430 (&amp;vcpu-&gt;mutex){+.+.}-{3:3}, en: kvm_vcpu_ioctl+0x7d/0x970 [kvm] seguimiento de pila: CPU: 15 PID: 1071 Comm: repro No contaminado 6.10.0-rc7-332d2c1d713e-next-vm #552 Nombre del hardware: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Seguimiento de llamadas:  dump_stack_lvl+0x7f/0x90 kvm_vcpu_ioctl_x86_set_vcpu_events+0x15d/0x2b0 [kvm] kvm_arch_vcpu_ioctl+0x1107/0x1750 [kvm] ? kvm_vcpu_ioctl+0x497/0x970 [kvm] kvm_vcpu_ioctl+0x497/0x970 [kvm] ? bloqueo_adquirir+0xba/0x2d0 ? encontrar_bloqueo_retenido+0x2b/0x80 ? hacer_error_dirección_usuario+0x40c/0x6f0 ? liberación_de_bloqueo+0xb7/0x270 __x64_sys_ioctl+0x82/0xb0 hacer_llamada_al_sistema_64+0x6c/0x170 entrada_SYSCALL_64_después_de_hwframe+0x4b/0x53 RIP: 0033:0x7ff11eb1b539","source":"nvd"}],"published":"2024-09-27T12:39:28.396Z","modified":"2026-08-05T11:38:52.433Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"e302786233e6bc512986d007c96458ccf5ca21c7","fixed":"5f35099fa3d59caf10bda88b033538e90086684e","status":"affected"},{"type":"git","introduced":"f7e570780efc5cec9b2ed1e0472a7da14e864fdb","fixed":"fa297c33faefe51e10244e8a378837fca4963228","status":"affected"},{"type":"git","introduced":"f7e570780efc5cec9b2ed1e0472a7da14e864fdb","fixed":"939375737b5a0b1bf9b1e75129054e11bc9ca65e","status":"affected"},{"type":"git","introduced":"f7e570780efc5cec9b2ed1e0472a7da14e864fdb","fixed":"ecdbe8ac86fb5538ccc623a41f88ec96c7168ab9","status":"affected"},{"type":"git","introduced":"f7e570780efc5cec9b2ed1e0472a7da14e864fdb","fixed":"4bcdd831d9d01e0fb64faea50732b59b2ee88da1","status":"affected"},{"type":"git","version":"080dbe7e9b86a0392d8dffc00d9971792afc121f","status":"affected"},{"type":"git","version":"b4c0d89c92e957ecccce12e66b63875d0cc7af7e","status":"affected"},{"type":"semver","introduced":"5.15.19","fixed":"5.15.198","status":"affected"},{"type":"semver","introduced":"5.10.97","fixed":"5.11","status":"affected"},{"type":"semver","introduced":"5.16.5","fixed":"5.17","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.17","status":"unaffected"},{"type":"semver","introduced":"5.15.198","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.110","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.51","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.10.10","lastAffected":"6.10.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.11","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"5.10.97","fixed":"5.11"},{"status":"affected","introduced":"5.15.19","fixed":"5.15.198"},{"status":"affected","introduced":"5.16.5","fixed":"5.17"},{"status":"affected","introduced":"5.17.1","fixed":"6.1.110"},{"status":"affected","introduced":"6.2","fixed":"6.6.51"},{"status":"affected","introduced":"6.7","fixed":"6.10.10"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"},{"status":"affected","version":"6.11"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5f35099fa3d59caf10bda88b033538e90086684e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fa297c33faefe51e10244e8a378837fca4963228","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/939375737b5a0b1bf9b1e75129054e11bc9ca65e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ecdbe8ac86fb5538ccc623a41f88ec96c7168ab9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4bcdd831d9d01e0fb64faea50732b59b2ee88da1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-29T14:12:09.375Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-46830","url":"https://www.cve.org/CVERecord?id=CVE-2024-46830","licence":"CVE Terms of Use","modified":"2026-08-05T11:38:52.433Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-46830","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-46830","licence":"Public domain","modified":"2026-08-04T11:20:30.960Z"}],"updatedAt":"2026-11-25T22:58:45.835Z","epss":{"score":0.00247,"percentile":0.17148,"date":"2026-12-01T12:00:22.000Z"}}