CVE-2025-37957 (GCVE-0-2025-37957)
Vulnerability from cvelistv5
Published
2025-05-20 16:01
Modified
2025-05-26 05:24
Severity ?
Summary
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]
Impacted products
Vendor Product Version
Linux Linux Version: ed129ec9057f89d615ba0c81a4984a90345a1684
Version: ed129ec9057f89d615ba0c81a4984a90345a1684
Version: ed129ec9057f89d615ba0c81a4984a90345a1684
Version: ed129ec9057f89d615ba0c81a4984a90345a1684
Version: 6425c590d0cc6914658a630a40b7f8226aa028c3
Version: d40ef0a511676bd65ca9acb295430c07af59ab85
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/smm.c",
            "arch/x86/kvm/svm/svm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ec24e62a1dd3540ee696314422040180040c1e4a",
              "status": "affected",
              "version": "ed129ec9057f89d615ba0c81a4984a90345a1684",
              "versionType": "git"
            },
            {
              "lessThan": "d362b21fefcef7eda8f1cd78a5925735d2b3287c",
              "status": "affected",
              "version": "ed129ec9057f89d615ba0c81a4984a90345a1684",
              "versionType": "git"
            },
            {
              "lessThan": "e9b28bc65fd3a56755ba503258024608292b4ab1",
              "status": "affected",
              "version": "ed129ec9057f89d615ba0c81a4984a90345a1684",
              "versionType": "git"
            },
            {
              "lessThan": "a2620f8932fa9fdabc3d78ed6efb004ca409019f",
              "status": "affected",
              "version": "ed129ec9057f89d615ba0c81a4984a90345a1684",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "6425c590d0cc6914658a630a40b7f8226aa028c3",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "d40ef0a511676bd65ca9acb295430c07af59ab85",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/smm.c",
            "arch/x86/kvm/svm/svm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.1"
            },
            {
              "lessThan": "6.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.92",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.29",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.92",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.29",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.7",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.15.81",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.0.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception\n\nPreviously, commit ed129ec9057f (\"KVM: x86: forcibly leave nested mode\non vCPU reset\") addressed an issue where a triple fault occurring in\nnested mode could lead to use-after-free scenarios. However, the commit\ndid not handle the analogous situation for System Management Mode (SMM).\n\nThis omission results in triggering a WARN when KVM forces a vCPU INIT\nafter SHUTDOWN interception while the vCPU is in SMM. This situation was\nreprodused using Syzkaller by:\n\n  1) Creating a KVM VM and vCPU\n  2) Sending a KVM_SMI ioctl to explicitly enter SMM\n  3) Executing invalid instructions causing consecutive exceptions and\n     eventually a triple fault\n\nThe issue manifests as follows:\n\n  WARNING: CPU: 0 PID: 25506 at arch/x86/kvm/x86.c:12112\n  kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112\n  Modules linked in:\n  CPU: 0 PID: 25506 Comm: syz-executor.0 Not tainted\n  6.1.130-syzkaller-00157-g164fe5dde9b6 #0\n  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),\n  BIOS 1.12.0-1 04/01/2014\n  RIP: 0010:kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112\n  Call Trace:\n   \u003cTASK\u003e\n   shutdown_interception+0x66/0xb0 arch/x86/kvm/svm/svm.c:2136\n   svm_invoke_exit_handler+0x110/0x530 arch/x86/kvm/svm/svm.c:3395\n   svm_handle_exit+0x424/0x920 arch/x86/kvm/svm/svm.c:3457\n   vcpu_enter_guest arch/x86/kvm/x86.c:10959 [inline]\n   vcpu_run+0x2c43/0x5a90 arch/x86/kvm/x86.c:11062\n   kvm_arch_vcpu_ioctl_run+0x50f/0x1cf0 arch/x86/kvm/x86.c:11283\n   kvm_vcpu_ioctl+0x570/0xf00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4122\n   vfs_ioctl fs/ioctl.c:51 [inline]\n   __do_sys_ioctl fs/ioctl.c:870 [inline]\n   __se_sys_ioctl fs/ioctl.c:856 [inline]\n   __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:856\n   do_syscall_x64 arch/x86/entry/common.c:51 [inline]\n   do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81\n   entry_SYSCALL_64_after_hwframe+0x6e/0xd8\n\nArchitecturally, INIT is blocked when the CPU is in SMM, hence KVM\u0027s WARN()\nin kvm_vcpu_reset() to guard against KVM bugs, e.g. to detect improper\nemulation of INIT.  SHUTDOWN on SVM is a weird edge case where KVM needs to\ndo _something_ sane with the VMCB, since it\u0027s technically undefined, and\nINIT is the least awful choice given KVM\u0027s ABI.\n\nSo, double down on stuffing INIT on SHUTDOWN, and force the vCPU out of\nSMM to avoid any weirdness (and the WARN).\n\nFound by Linux Verification Center (linuxtesting.org) with Syzkaller.\n\n[sean: massage changelog, make it clear this isn\u0027t architectural behavior]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-26T05:24:32.192Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ec24e62a1dd3540ee696314422040180040c1e4a"
        },
        {
          "url": "https://git.kernel.org/stable/c/d362b21fefcef7eda8f1cd78a5925735d2b3287c"
        },
        {
          "url": "https://git.kernel.org/stable/c/e9b28bc65fd3a56755ba503258024608292b4ab1"
        },
        {
          "url": "https://git.kernel.org/stable/c/a2620f8932fa9fdabc3d78ed6efb004ca409019f"
        }
      ],
      "title": "KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-37957",
    "datePublished": "2025-05-20T16:01:50.878Z",
    "dateReserved": "2025-04-16T04:51:23.974Z",
    "dateUpdated": "2025-05-26T05:24:32.192Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-37957\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-20T16:15:33.917\",\"lastModified\":\"2025-05-22T13:15:55.897\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception\\n\\nPreviously, commit ed129ec9057f (\\\"KVM: x86: forcibly leave nested mode\\non vCPU reset\\\") addressed an issue where a triple fault occurring in\\nnested mode could lead to use-after-free scenarios. However, the commit\\ndid not handle the analogous situation for System Management Mode (SMM).\\n\\nThis omission results in triggering a WARN when KVM forces a vCPU INIT\\nafter SHUTDOWN interception while the vCPU is in SMM. This situation was\\nreprodused using Syzkaller by:\\n\\n  1) Creating a KVM VM and vCPU\\n  2) Sending a KVM_SMI ioctl to explicitly enter SMM\\n  3) Executing invalid instructions causing consecutive exceptions and\\n     eventually a triple fault\\n\\nThe issue manifests as follows:\\n\\n  WARNING: CPU: 0 PID: 25506 at arch/x86/kvm/x86.c:12112\\n  kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112\\n  Modules linked in:\\n  CPU: 0 PID: 25506 Comm: syz-executor.0 Not tainted\\n  6.1.130-syzkaller-00157-g164fe5dde9b6 #0\\n  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),\\n  BIOS 1.12.0-1 04/01/2014\\n  RIP: 0010:kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112\\n  Call Trace:\\n   \u003cTASK\u003e\\n   shutdown_interception+0x66/0xb0 arch/x86/kvm/svm/svm.c:2136\\n   svm_invoke_exit_handler+0x110/0x530 arch/x86/kvm/svm/svm.c:3395\\n   svm_handle_exit+0x424/0x920 arch/x86/kvm/svm/svm.c:3457\\n   vcpu_enter_guest arch/x86/kvm/x86.c:10959 [inline]\\n   vcpu_run+0x2c43/0x5a90 arch/x86/kvm/x86.c:11062\\n   kvm_arch_vcpu_ioctl_run+0x50f/0x1cf0 arch/x86/kvm/x86.c:11283\\n   kvm_vcpu_ioctl+0x570/0xf00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4122\\n   vfs_ioctl fs/ioctl.c:51 [inline]\\n   __do_sys_ioctl fs/ioctl.c:870 [inline]\\n   __se_sys_ioctl fs/ioctl.c:856 [inline]\\n   __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:856\\n   do_syscall_x64 arch/x86/entry/common.c:51 [inline]\\n   do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81\\n   entry_SYSCALL_64_after_hwframe+0x6e/0xd8\\n\\nArchitecturally, INIT is blocked when the CPU is in SMM, hence KVM\u0027s WARN()\\nin kvm_vcpu_reset() to guard against KVM bugs, e.g. to detect improper\\nemulation of INIT.  SHUTDOWN on SVM is a weird edge case where KVM needs to\\ndo _something_ sane with the VMCB, since it\u0027s technically undefined, and\\nINIT is the least awful choice given KVM\u0027s ABI.\\n\\nSo, double down on stuffing INIT on SHUTDOWN, and force the vCPU out of\\nSMM to avoid any weirdness (and the WARN).\\n\\nFound by Linux Verification Center (linuxtesting.org) with Syzkaller.\\n\\n[sean: massage changelog, make it clear this isn\u0027t architectural behavior]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: KVM: SVM: Forzar la salida del modo SMM al interceptar el apagado. Anteriormente, el commit ed129ec9057f (\\\"KVM: x86: forzar la salida del modo anidado al reiniciar la vCPU\\\") solucion\u00f3 un problema en el que una triple falla en el modo anidado pod\u00eda provocar escenarios de use-after-free. Sin embargo, esta confirmaci\u00f3n no solucion\u00f3 la situaci\u00f3n an\u00e1loga para el modo de administraci\u00f3n del sistema (SMM). Esta omisi\u00f3n provoca la activaci\u00f3n de una advertencia cuando KVM fuerza una inicializaci\u00f3n de la vCPU tras la interceptaci\u00f3n del apagado mientras esta se encuentra en SMM. Esta situaci\u00f3n se reprodujo utilizando Syzkaller mediante: 1) la creaci\u00f3n de una m\u00e1quina virtual KVM y vCPU 2) el env\u00edo de un ioctl KVM_SMI para ingresar expl\u00edcitamente a SMM 3) la ejecuci\u00f3n de instrucciones no v\u00e1lidas que causan excepciones consecutivas y, finalmente, un fallo triple El problema se manifiesta de la siguiente manera: ADVERTENCIA: CPU: 0 PID: 25506 en arch/x86/kvm/x86.c:12112 kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 M\u00f3dulos vinculados en: CPU: 0 PID: 25506 Comm: syz-executor.0 No contaminado 6.1.130-syzkaller-00157-g164fe5dde9b6 #0 Nombre del hardware: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 01/04/2014 RIP: 0010:kvm_vcpu_reset+0x1d2/0x1530 arch/x86/kvm/x86.c:12112 Rastreo de llamadas:  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 [en l\u00ednea] 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 [en l\u00ednea] __do_sys_ioctl fs/ioctl.c:870 [en l\u00ednea] __se_sys_ioctl fs/ioctl.c:856 [en l\u00ednea] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [en l\u00ednea] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Arquitect\u00f3nicamente, INIT se bloquea cuando la CPU est\u00e1 en SMM, de ah\u00ed el WARN() de KVM en kvm_vcpu_reset() para protegerse contra errores de KVM, por ejemplo, para detectar una emulaci\u00f3n incorrecta de INIT. SHUTDOWN en SVM es un caso extremo extra\u00f1o en el que KVM necesita hacer _algo_ sensato con el VMCB, ya que t\u00e9cnicamente no est\u00e1 definido, e INIT es la opci\u00f3n menos terrible dada la ABI de KVM. As\u00ed que, redobla la apuesta por el uso excesivo de INIT al apagar y fuerza la salida de la vCPU de SMM para evitar cualquier anomal\u00eda (y la advertencia). Encontrado por el Centro de Verificaci\u00f3n de Linux (linuxtesting.org) con Syzkaller. [sean: revisa el registro de cambios, aclara que esto no es un comportamiento arquitect\u00f3nico]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/a2620f8932fa9fdabc3d78ed6efb004ca409019f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d362b21fefcef7eda8f1cd78a5925735d2b3287c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e9b28bc65fd3a56755ba503258024608292b4ab1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ec24e62a1dd3540ee696314422040180040c1e4a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…