CVE-2022-48763

In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Forcibly leave nested virt when SMM state is toggled Forcibly leave nested virtualization operation if userspace toggles SMM state via KVM_SET_VCPU_EVENTS or KVM_SYNC_X86_EVENTS. If userspace forces the vCPU out of SMM while it's post-VMXON and then injects an SMI, vmx_enter_smm() will overwrite vmx->nested.smm.vmxon and end up with both vmxon=false and smm.vmxon=false, but all other nVMX state allocated. Don't attempt to gracefully handle the transition as (a) most transitions are nonsencial, e.g. forcing SMM while L2 is running, (b) there isn't sufficient information to handle all transitions, e.g. SVM wants access to the SMRAM save state, and (c) KVM_SET_VCPU_EVENTS must precede KVM_SET_NESTED_STATE during state restore as the latter disallows putting the vCPU into L2 if SMM is active, and disallows tagging the vCPU as being post-VMXON in SMM if SMM is not active. Abuse of KVM_SET_VCPU_EVENTS manifests as a WARN and memory leak in nVMX due to failure to free vmcs01's shadow VMCS, but the bug goes far beyond just a memory leak, e.g. toggling SMM on while L2 is active puts the vCPU in an architecturally impossible state. WARNING: CPU: 0 PID: 3606 at free_loaded_vmcs arch/x86/kvm/vmx/vmx.c:2665 [inline] WARNING: CPU: 0 PID: 3606 at free_loaded_vmcs+0x158/0x1a0 arch/x86/kvm/vmx/vmx.c:2656 Modules linked in: CPU: 1 PID: 3606 Comm: syz-executor725 Not tainted 5.17.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:free_loaded_vmcs arch/x86/kvm/vmx/vmx.c:2665 [inline] RIP: 0010:free_loaded_vmcs+0x158/0x1a0 arch/x86/kvm/vmx/vmx.c:2656 Code: <0f> 0b eb b3 e8 8f 4d 9f 00 e9 f7 fe ff ff 48 89 df e8 92 4d 9f 00 Call Trace: <TASK> kvm_arch_vcpu_destroy+0x72/0x2f0 arch/x86/kvm/x86.c:11123 kvm_vcpu_destroy arch/x86/kvm/../../../virt/kvm/kvm_main.c:441 [inline] kvm_destroy_vcpus+0x11f/0x290 arch/x86/kvm/../../../virt/kvm/kvm_main.c:460 kvm_free_vcpus arch/x86/kvm/x86.c:11564 [inline] kvm_arch_destroy_vm+0x2e8/0x470 arch/x86/kvm/x86.c:11676 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:1217 [inline] kvm_put_kvm+0x4fa/0xb00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1250 kvm_vm_release+0x3f/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1273 __fput+0x286/0x9f0 fs/file_table.c:311 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xb29/0x2a30 kernel/exit.c:806 do_group_exit+0xd2/0x2f0 kernel/exit.c:935 get_signal+0x4b0/0x28c0 kernel/signal.c:2862 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae </TASK>
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*

History

17 Sep 2025, 16:50

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
CWE CWE-401
CPE cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
References () https://git.kernel.org/stable/c/080dbe7e9b86a0392d8dffc00d9971792afc121f - () https://git.kernel.org/stable/c/080dbe7e9b86a0392d8dffc00d9971792afc121f - Patch
References () https://git.kernel.org/stable/c/b4c0d89c92e957ecccce12e66b63875d0cc7af7e - () https://git.kernel.org/stable/c/b4c0d89c92e957ecccce12e66b63875d0cc7af7e - Patch
References () https://git.kernel.org/stable/c/e302786233e6bc512986d007c96458ccf5ca21c7 - () https://git.kernel.org/stable/c/e302786233e6bc512986d007c96458ccf5ca21c7 - Patch
References () https://git.kernel.org/stable/c/f7e570780efc5cec9b2ed1e0472a7da14e864fdb - () https://git.kernel.org/stable/c/f7e570780efc5cec9b2ed1e0472a7da14e864fdb - Patch

21 Nov 2024, 07:33

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se resolvió la siguiente vulnerabilidad: KVM: x86: abandonar por la fuerza la virt anidada cuando se alterna el estado de SMM. Dejar por la fuerza la operación de virtualización anidada si el espacio de usuario alterna el estado de SMM mediante KVM_SET_VCPU_EVENTS o KVM_SYNC_X86_EVENTS. Si el espacio de usuario fuerza a la vCPU a salir de SMM mientras es posterior a VMXON y luego inyecta un SMI, vmx_enter_smm() sobrescribirá vmx-&gt;nested.smm.vmxon y terminará con vmxon=false y smm.vmxon=false, pero todos los demás Estado nVMX asignado. No intente manejar la transición con elegancia ya que (a) la mayoría de las transiciones no tienen sentido, por ejemplo, forzar SMM mientras se ejecuta L2, (b) no hay suficiente información para manejar todas las transiciones, por ejemplo, SVM quiere acceder al estado de guardado de SMRAM, y (c) KVM_SET_VCPU_EVENTS debe preceder a KVM_SET_NESTED_STATE durante la restauración del estado, ya que este último no permite colocar la vCPU en L2 si SMM está activo y no permite etiquetar la vCPU como posterior a VMXON en SMM si SMM no está activo. El abuso de KVM_SET_VCPU_EVENTS se manifiesta como una ADVERTENCIA y una pérdida de memoria en nVMX debido a una falla al liberar el VMCS oculto de vmcs01, pero el error va mucho más allá de una simple pérdida de memoria; por ejemplo, activar SMM mientras L2 está activo coloca la vCPU en un estado arquitectónicamente imposible. ADVERTENCIA: CPU: 0 PID: 3606 en free_loaded_vmcs arch/x86/kvm/vmx/vmx.c:2665 [en línea] ADVERTENCIA: CPU: 0 PID: 3606 en free_loaded_vmcs+0x158/0x1a0 arch/x86/kvm/vmx/vmx. c:2656 Módulos vinculados en: CPU: 1 PID: 3606 Comm: syz-executor725 Not tainted 5.17.0-rc1-syzkaller #0 Nombre del hardware: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:free_loaded_vmcs arch/x86/kvm/vmx/vmx.c:2665 [en línea] RIP: 0010:free_loaded_vmcs+0x158/0x1a0 arch/x86/kvm/vmx/vmx.c:2656 Código: &lt;0f&gt; 0b eb b3 e8 8f 4d 9f 00 e9 f7 fe ff ff 48 89 df e8 92 4d 9f 00 Seguimiento de llamadas: kvm_arch_vcpu_destroy+0x72/0x2f0 arch/x86/kvm/x86.c:11123 kvm_vcpu_destroy arch/x86/kvm/../. ./../virt/kvm/kvm_main.c:441 [en línea] kvm_destroy_vcpus+0x11f/0x290 arch/x86/kvm/../../../virt/kvm/kvm_main.c:460 kvm_free_vcpus arch/x86 /kvm/x86.c:11564 [en línea] kvm_arch_destroy_vm+0x2e8/0x470 arch/x86/kvm/x86.c:11676 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c :1217 [en línea] kvm_put_kvm+0x4fa/0xb00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1250 kvm_vm_release+0x3f/0x50 arch/x86/kvm/../.. /../virt/kvm/kvm_main.c:1273 __fput+0x286/0x9f0 fs/file_table.c:311 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [en línea] do_exit+0xb29/0x2a30 kernel/exit.c:806 do_group_exit+0xd2/0x2f0 kernel/exit.c:935 get_signal+0x4b0/0x28c0 kernel/signal.c:2862 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c :868 handle_signal_work kernel/entry/common.c:148 [en línea] exit_to_user_mode_loop kernel/entry/common.c:172 [en línea] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c :289 [en línea] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 Entry_SYSCALL_64_after_hwframe+0x44/0xae
References () https://git.kernel.org/stable/c/080dbe7e9b86a0392d8dffc00d9971792afc121f - () https://git.kernel.org/stable/c/080dbe7e9b86a0392d8dffc00d9971792afc121f -
References () https://git.kernel.org/stable/c/b4c0d89c92e957ecccce12e66b63875d0cc7af7e - () https://git.kernel.org/stable/c/b4c0d89c92e957ecccce12e66b63875d0cc7af7e -
References () https://git.kernel.org/stable/c/e302786233e6bc512986d007c96458ccf5ca21c7 - () https://git.kernel.org/stable/c/e302786233e6bc512986d007c96458ccf5ca21c7 -
References () https://git.kernel.org/stable/c/f7e570780efc5cec9b2ed1e0472a7da14e864fdb - () https://git.kernel.org/stable/c/f7e570780efc5cec9b2ed1e0472a7da14e864fdb -

20 Jun 2024, 12:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-06-20 12:15

Updated : 2025-09-17 16:50


NVD link : CVE-2022-48763

Mitre link : CVE-2022-48763

CVE.ORG link : CVE-2022-48763


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-401

Missing Release of Memory after Effective Lifetime