CVE-2025-37957: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception Previously, commit ed129ec9057f ("KVM: x86: forcibly leave nested mode on vCPU reset") addressed an issue where a triple fault occurring in nested mode could lead to use-after-free scenarios. However, the commit did not handle the analogous situation for System Management Mode (SMM). This omission results in triggering a WARN when KVM forces a vCPU INIT after SHUTDOWN interception while the vCPU is in SMM. This situation was reprodused using Syzkaller by: 1) Creating a KVM VM and vCPU 2) Sending a KVM_SMI ioctl to explicitly enter SMM 3) Executing invalid instructions causing consecutive exceptions and eventually a triple fault The issue manifests as follows: WARNING: CPU: 0 PID: 25506 at arch/x86/kvm/x86.c:12112 kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 Modules linked in: CPU: 0 PID: 25506 Comm: syz-executor.0 Not tainted 6.1.130-syzkaller-00157-g164fe5dde9b6 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 Call Trace: <TASK> shutdown_interception+0x66/0xb0 arch/x86/kvm/svm/svm.c:2136 svm_invoke_exit_handler+0x110/0x530 arch/x86/kvm/svm/svm.c:3395 svm_handle_exit+0x424/0x920 arch/x86/kvm/svm/svm.c:3457 vcpu_enter_guest arch/x86/kvm/x86.c:10959 [inline] vcpu_run+0x2c43/0x5a90 arch/x86/kvm/x86.c:11062 kvm_arch_vcpu_ioctl_run+0x50f/0x1cf0 arch/x86/kvm/x86.c:11283 kvm_vcpu_ioctl+0x570/0xf00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4122 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Architecturally, INIT is blocked when the CPU is in SMM, hence KVM's WARN() in kvm_vcpu_reset() to guard against KVM bugs, e.g. to detect improper emulation of INIT. SHUTDOWN on SVM is a weird edge case where KVM needs to do _something_ sane with the VMCB, since it's technically undefined, and INIT is the least awful choice given KVM's ABI. So, double down on stuffing INIT on SHUTDOWN, and force the vCPU out of SMM to avoid any weirdness (and the WARN). Found by Linux Verification Center (linuxtesting.org) with Syzkaller. [sean: massage changelog, make it clear this isn't architectural behavior]
AI Analysis
Technical Summary
CVE-2025-37957 is a vulnerability identified in the Linux kernel's Kernel-based Virtual Machine (KVM) subsystem, specifically affecting the Secure Virtual Machine (SVM) implementation for AMD processors. The issue arises from improper handling of the System Management Mode (SMM) state during a SHUTDOWN interception event in nested virtualization scenarios. Previously, a related fix addressed use-after-free conditions caused by triple faults in nested mode by forcibly exiting nested mode on virtual CPU (vCPU) reset. However, this fix did not cover the analogous case when the vCPU is in SMM, a highly privileged CPU mode used for low-level system management tasks. The vulnerability manifests when KVM forces a vCPU INIT (initialization) after a SHUTDOWN interception while the vCPU remains in SMM. Architecturally, the CPU blocks INIT commands during SMM, so KVM's current behavior triggers a kernel warning (WARN) to indicate potential emulation bugs. This WARN can be triggered by crafted sequences involving entering SMM via KVM_SMI ioctl, executing invalid instructions to cause exceptions, and eventually inducing a triple fault. The root cause is that KVM does not forcibly exit SMM before issuing INIT on SHUTDOWN, leading to undefined behavior and potential instability or denial of service within the virtualized environment. The Linux kernel developers have addressed this by enhancing the KVM code to forcibly exit SMM mode on SHUTDOWN interception, ensuring the vCPU is in a sane state before INIT is applied. This fix prevents the WARN and stabilizes the behavior under these edge-case conditions. The vulnerability was discovered using Syzkaller, a kernel fuzzing tool, by the Linux Verification Center. The affected versions include several recent Linux kernel commits prior to the fix. No known exploits are reported in the wild as of the publication date. This vulnerability is subtle and primarily impacts environments using nested virtualization with KVM on AMD hardware where SMM is explicitly manipulated. It involves complex CPU modes and virtualization internals, making exploitation non-trivial and requiring specific conditions to trigger the issue.
Potential Impact
For European organizations, the impact of CVE-2025-37957 is primarily relevant to those utilizing Linux-based virtualization infrastructures, especially those employing nested virtualization with KVM on AMD platforms. Such environments are common in cloud service providers, data centers, and enterprises running private clouds or virtualized test environments. The vulnerability could lead to kernel warnings and potential instability or crashes in virtual machines, resulting in denial of service conditions. While it does not directly lead to privilege escalation or data leakage, the instability could disrupt critical services, impacting availability. Given the reliance on Linux and KVM in European IT infrastructures, particularly in sectors like finance, telecommunications, and government where virtualization is prevalent, this vulnerability could affect service reliability. However, the requirement for specific conditions (nested virtualization, SMM manipulation) limits the scope to specialized use cases rather than general Linux deployments. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or accidental triggering during fuzz testing or malformed workloads. Organizations running virtualized environments with AMD processors should be aware of this issue as it could complicate debugging and stability of nested VMs, potentially affecting development, testing, or production workloads relying on nested virtualization capabilities.
Mitigation Recommendations
1. Apply the latest Linux kernel patches that address CVE-2025-37957 as soon as they become available. Monitor kernel updates from trusted sources and prioritize updating hypervisor hosts running KVM on AMD hardware. 2. Review and restrict the use of nested virtualization where possible, especially in production environments, to reduce exposure to this and similar vulnerabilities. 3. Limit or disable the use of explicit SMM entry via KVM_SMI ioctl unless absolutely necessary, as this is a key step in triggering the vulnerability. 4. Implement rigorous testing and monitoring of virtualized environments to detect kernel WARNs or instability related to vCPU resets and SMM state transitions. 5. For organizations using automated fuzzing or testing tools like Syzkaller, ensure these tools are run in isolated environments to prevent accidental triggering of the vulnerability in production. 6. Maintain strict access controls and audit logs around virtualization management interfaces to prevent unauthorized or malformed ioctl calls that could exploit this vulnerability. 7. Collaborate with hardware vendors and Linux distribution maintainers to ensure timely dissemination and deployment of patches across all affected systems.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Italy, Spain, Poland
CVE-2025-37957: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception Previously, commit ed129ec9057f ("KVM: x86: forcibly leave nested mode on vCPU reset") addressed an issue where a triple fault occurring in nested mode could lead to use-after-free scenarios. However, the commit did not handle the analogous situation for System Management Mode (SMM). This omission results in triggering a WARN when KVM forces a vCPU INIT after SHUTDOWN interception while the vCPU is in SMM. This situation was reprodused using Syzkaller by: 1) Creating a KVM VM and vCPU 2) Sending a KVM_SMI ioctl to explicitly enter SMM 3) Executing invalid instructions causing consecutive exceptions and eventually a triple fault The issue manifests as follows: WARNING: CPU: 0 PID: 25506 at arch/x86/kvm/x86.c:12112 kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 Modules linked in: CPU: 0 PID: 25506 Comm: syz-executor.0 Not tainted 6.1.130-syzkaller-00157-g164fe5dde9b6 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 Call Trace: <TASK> shutdown_interception+0x66/0xb0 arch/x86/kvm/svm/svm.c:2136 svm_invoke_exit_handler+0x110/0x530 arch/x86/kvm/svm/svm.c:3395 svm_handle_exit+0x424/0x920 arch/x86/kvm/svm/svm.c:3457 vcpu_enter_guest arch/x86/kvm/x86.c:10959 [inline] vcpu_run+0x2c43/0x5a90 arch/x86/kvm/x86.c:11062 kvm_arch_vcpu_ioctl_run+0x50f/0x1cf0 arch/x86/kvm/x86.c:11283 kvm_vcpu_ioctl+0x570/0xf00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4122 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Architecturally, INIT is blocked when the CPU is in SMM, hence KVM's WARN() in kvm_vcpu_reset() to guard against KVM bugs, e.g. to detect improper emulation of INIT. SHUTDOWN on SVM is a weird edge case where KVM needs to do _something_ sane with the VMCB, since it's technically undefined, and INIT is the least awful choice given KVM's ABI. So, double down on stuffing INIT on SHUTDOWN, and force the vCPU out of SMM to avoid any weirdness (and the WARN). Found by Linux Verification Center (linuxtesting.org) with Syzkaller. [sean: massage changelog, make it clear this isn't architectural behavior]
AI-Powered Analysis
Technical Analysis
CVE-2025-37957 is a vulnerability identified in the Linux kernel's Kernel-based Virtual Machine (KVM) subsystem, specifically affecting the Secure Virtual Machine (SVM) implementation for AMD processors. The issue arises from improper handling of the System Management Mode (SMM) state during a SHUTDOWN interception event in nested virtualization scenarios. Previously, a related fix addressed use-after-free conditions caused by triple faults in nested mode by forcibly exiting nested mode on virtual CPU (vCPU) reset. However, this fix did not cover the analogous case when the vCPU is in SMM, a highly privileged CPU mode used for low-level system management tasks. The vulnerability manifests when KVM forces a vCPU INIT (initialization) after a SHUTDOWN interception while the vCPU remains in SMM. Architecturally, the CPU blocks INIT commands during SMM, so KVM's current behavior triggers a kernel warning (WARN) to indicate potential emulation bugs. This WARN can be triggered by crafted sequences involving entering SMM via KVM_SMI ioctl, executing invalid instructions to cause exceptions, and eventually inducing a triple fault. The root cause is that KVM does not forcibly exit SMM before issuing INIT on SHUTDOWN, leading to undefined behavior and potential instability or denial of service within the virtualized environment. The Linux kernel developers have addressed this by enhancing the KVM code to forcibly exit SMM mode on SHUTDOWN interception, ensuring the vCPU is in a sane state before INIT is applied. This fix prevents the WARN and stabilizes the behavior under these edge-case conditions. The vulnerability was discovered using Syzkaller, a kernel fuzzing tool, by the Linux Verification Center. The affected versions include several recent Linux kernel commits prior to the fix. No known exploits are reported in the wild as of the publication date. This vulnerability is subtle and primarily impacts environments using nested virtualization with KVM on AMD hardware where SMM is explicitly manipulated. It involves complex CPU modes and virtualization internals, making exploitation non-trivial and requiring specific conditions to trigger the issue.
Potential Impact
For European organizations, the impact of CVE-2025-37957 is primarily relevant to those utilizing Linux-based virtualization infrastructures, especially those employing nested virtualization with KVM on AMD platforms. Such environments are common in cloud service providers, data centers, and enterprises running private clouds or virtualized test environments. The vulnerability could lead to kernel warnings and potential instability or crashes in virtual machines, resulting in denial of service conditions. While it does not directly lead to privilege escalation or data leakage, the instability could disrupt critical services, impacting availability. Given the reliance on Linux and KVM in European IT infrastructures, particularly in sectors like finance, telecommunications, and government where virtualization is prevalent, this vulnerability could affect service reliability. However, the requirement for specific conditions (nested virtualization, SMM manipulation) limits the scope to specialized use cases rather than general Linux deployments. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or accidental triggering during fuzz testing or malformed workloads. Organizations running virtualized environments with AMD processors should be aware of this issue as it could complicate debugging and stability of nested VMs, potentially affecting development, testing, or production workloads relying on nested virtualization capabilities.
Mitigation Recommendations
1. Apply the latest Linux kernel patches that address CVE-2025-37957 as soon as they become available. Monitor kernel updates from trusted sources and prioritize updating hypervisor hosts running KVM on AMD hardware. 2. Review and restrict the use of nested virtualization where possible, especially in production environments, to reduce exposure to this and similar vulnerabilities. 3. Limit or disable the use of explicit SMM entry via KVM_SMI ioctl unless absolutely necessary, as this is a key step in triggering the vulnerability. 4. Implement rigorous testing and monitoring of virtualized environments to detect kernel WARNs or instability related to vCPU resets and SMM state transitions. 5. For organizations using automated fuzzing or testing tools like Syzkaller, ensure these tools are run in isolated environments to prevent accidental triggering of the vulnerability in production. 6. Maintain strict access controls and audit logs around virtualization management interfaces to prevent unauthorized or malformed ioctl calls that could exploit this vulnerability. 7. Collaborate with hardware vendors and Linux distribution maintainers to ensure timely dissemination and deployment of patches across all affected systems.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-04-16T04:51:23.974Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682cd0f71484d88663aeae85
Added to database: 5/20/2025, 6:59:03 PM
Last enriched: 7/3/2025, 6:56:58 PM
Last updated: 8/18/2025, 11:28:36 PM
Views: 18
Related Threats
CVE-2025-9132: Out of bounds write in Google Chrome
HighCVE-2025-9193: Open Redirect in TOTVS Portal Meu RH
MediumCVE-2025-9176: OS Command Injection in neurobin shc
MediumCVE-2025-9175: Stack-based Buffer Overflow in neurobin shc
MediumCVE-2025-9174: OS Command Injection in neurobin shc
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.