CVE-2024-53196
Vulnerability from cvelistv5
Published
2024-12-27 13:49
Modified
2025-01-20 06:21
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: Don't retire aborted MMIO instruction Returning an abort to the guest for an unsupported MMIO access is a documented feature of the KVM UAPI. Nevertheless, it's clear that this plumbing has seen limited testing, since userspace can trivially cause a WARN in the MMIO return: WARNING: CPU: 0 PID: 30558 at arch/arm64/include/asm/kvm_emulate.h:536 kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536 Call trace: kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536 kvm_arch_vcpu_ioctl_run+0x98/0x15b4 arch/arm64/kvm/arm.c:1133 kvm_vcpu_ioctl+0x75c/0xa78 virt/kvm/kvm_main.c:4487 __do_sys_ioctl fs/ioctl.c:51 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:893 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x1e0/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x38/0x68 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x90/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The splat is complaining that KVM is advancing PC while an exception is pending, i.e. that KVM is retiring the MMIO instruction despite a pending synchronous external abort. Womp womp. Fix the glaring UAPI bug by skipping over all the MMIO emulation in case there is a pending synchronous exception. Note that while userspace is capable of pending an asynchronous exception (SError, IRQ, or FIQ), it is still safe to retire the MMIO instruction in this case as (1) they are by definition asynchronous, and (2) KVM relies on hardware support for pending/delivering these exceptions instead of the software state machine for advancing PC.
Impacted products
Vendor Product Version
Linux Linux Version: da345174ceca052469e4775e4ae263b5f27a9355
Version: da345174ceca052469e4775e4ae263b5f27a9355
Version: da345174ceca052469e4775e4ae263b5f27a9355
Version: da345174ceca052469e4775e4ae263b5f27a9355
Version: da345174ceca052469e4775e4ae263b5f27a9355
Create a notification for this product.
   Linux Linux Version: 5.5
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/arm64/kvm/mmio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6af853cf5f897d55f42e9166f4db50e84e404fb3",
              "status": "affected",
              "version": "da345174ceca052469e4775e4ae263b5f27a9355",
              "versionType": "git"
            },
            {
              "lessThan": "ea6b5d98fea4ee8cb443ea98fda520909e90d30e",
              "status": "affected",
              "version": "da345174ceca052469e4775e4ae263b5f27a9355",
              "versionType": "git"
            },
            {
              "lessThan": "1e46460efe1ef9a31748de7675ff8fe0d8601af2",
              "status": "affected",
              "version": "da345174ceca052469e4775e4ae263b5f27a9355",
              "versionType": "git"
            },
            {
              "lessThan": "d0571c3add987bcb69c2ffd7a70c998bf8ce60fb",
              "status": "affected",
              "version": "da345174ceca052469e4775e4ae263b5f27a9355",
              "versionType": "git"
            },
            {
              "lessThan": "e735a5da64420a86be370b216c269b5dd8e830e2",
              "status": "affected",
              "version": "da345174ceca052469e4775e4ae263b5f27a9355",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/arm64/kvm/mmio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.5"
            },
            {
              "lessThan": "5.5",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Don\u0027t retire aborted MMIO instruction\n\nReturning an abort to the guest for an unsupported MMIO access is a\ndocumented feature of the KVM UAPI. Nevertheless, it\u0027s clear that this\nplumbing has seen limited testing, since userspace can trivially cause a\nWARN in the MMIO return:\n\n  WARNING: CPU: 0 PID: 30558 at arch/arm64/include/asm/kvm_emulate.h:536 kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536\n  Call trace:\n   kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536\n   kvm_arch_vcpu_ioctl_run+0x98/0x15b4 arch/arm64/kvm/arm.c:1133\n   kvm_vcpu_ioctl+0x75c/0xa78 virt/kvm/kvm_main.c:4487\n   __do_sys_ioctl fs/ioctl.c:51 [inline]\n   __se_sys_ioctl fs/ioctl.c:893 [inline]\n   __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:893\n   __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]\n   invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49\n   el0_svc_common+0x1e0/0x23c arch/arm64/kernel/syscall.c:132\n   do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151\n   el0_svc+0x38/0x68 arch/arm64/kernel/entry-common.c:712\n   el0t_64_sync_handler+0x90/0xfc arch/arm64/kernel/entry-common.c:730\n   el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598\n\nThe splat is complaining that KVM is advancing PC while an exception is\npending, i.e. that KVM is retiring the MMIO instruction despite a\npending synchronous external abort. Womp womp.\n\nFix the glaring UAPI bug by skipping over all the MMIO emulation in\ncase there is a pending synchronous exception. Note that while userspace\nis capable of pending an asynchronous exception (SError, IRQ, or FIQ),\nit is still safe to retire the MMIO instruction in this case as (1) they\nare by definition asynchronous, and (2) KVM relies on hardware support\nfor pending/delivering these exceptions instead of the software state\nmachine for advancing PC."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-01-20T06:21:02.413Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6af853cf5f897d55f42e9166f4db50e84e404fb3"
        },
        {
          "url": "https://git.kernel.org/stable/c/ea6b5d98fea4ee8cb443ea98fda520909e90d30e"
        },
        {
          "url": "https://git.kernel.org/stable/c/1e46460efe1ef9a31748de7675ff8fe0d8601af2"
        },
        {
          "url": "https://git.kernel.org/stable/c/d0571c3add987bcb69c2ffd7a70c998bf8ce60fb"
        },
        {
          "url": "https://git.kernel.org/stable/c/e735a5da64420a86be370b216c269b5dd8e830e2"
        }
      ],
      "title": "KVM: arm64: Don\u0027t retire aborted MMIO instruction",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-53196",
    "datePublished": "2024-12-27T13:49:38.501Z",
    "dateReserved": "2024-11-19T17:17:25.015Z",
    "dateUpdated": "2025-01-20T06:21:02.413Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-53196\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-12-27T14:15:27.267\",\"lastModified\":\"2024-12-27T14:15:27.267\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: arm64: Don\u0027t retire aborted MMIO instruction\\n\\nReturning an abort to the guest for an unsupported MMIO access is a\\ndocumented feature of the KVM UAPI. Nevertheless, it\u0027s clear that this\\nplumbing has seen limited testing, since userspace can trivially cause a\\nWARN in the MMIO return:\\n\\n  WARNING: CPU: 0 PID: 30558 at arch/arm64/include/asm/kvm_emulate.h:536 kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536\\n  Call trace:\\n   kvm_handle_mmio_return+0x46c/0x5c4 arch/arm64/include/asm/kvm_emulate.h:536\\n   kvm_arch_vcpu_ioctl_run+0x98/0x15b4 arch/arm64/kvm/arm.c:1133\\n   kvm_vcpu_ioctl+0x75c/0xa78 virt/kvm/kvm_main.c:4487\\n   __do_sys_ioctl fs/ioctl.c:51 [inline]\\n   __se_sys_ioctl fs/ioctl.c:893 [inline]\\n   __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:893\\n   __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]\\n   invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49\\n   el0_svc_common+0x1e0/0x23c arch/arm64/kernel/syscall.c:132\\n   do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151\\n   el0_svc+0x38/0x68 arch/arm64/kernel/entry-common.c:712\\n   el0t_64_sync_handler+0x90/0xfc arch/arm64/kernel/entry-common.c:730\\n   el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598\\n\\nThe splat is complaining that KVM is advancing PC while an exception is\\npending, i.e. that KVM is retiring the MMIO instruction despite a\\npending synchronous external abort. Womp womp.\\n\\nFix the glaring UAPI bug by skipping over all the MMIO emulation in\\ncase there is a pending synchronous exception. Note that while userspace\\nis capable of pending an asynchronous exception (SError, IRQ, or FIQ),\\nit is still safe to retire the MMIO instruction in this case as (1) they\\nare by definition asynchronous, and (2) KVM relies on hardware support\\nfor pending/delivering these exceptions instead of the software state\\nmachine for advancing PC.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1e46460efe1ef9a31748de7675ff8fe0d8601af2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6af853cf5f897d55f42e9166f4db50e84e404fb3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d0571c3add987bcb69c2ffd7a70c998bf8ce60fb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e735a5da64420a86be370b216c269b5dd8e830e2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ea6b5d98fea4ee8cb443ea98fda520909e90d30e\",\"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.