cve-2024-47717
Vulnerability from cvelistv5
Published
2024-10-21 11:53
Modified
2024-12-19 09:26
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: RISC-V: KVM: Don't zero-out PMU snapshot area before freeing data With the latest Linux-6.11-rc3, the below NULL pointer crash is observed when SBI PMU snapshot is enabled for the guest and the guest is forcefully powered-off. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000508 Oops [#1] Modules linked in: kvm CPU: 0 UID: 0 PID: 61 Comm: term-poll Not tainted 6.11.0-rc3-00018-g44d7178dd77a #3 Hardware name: riscv-virtio,qemu (DT) epc : __kvm_write_guest_page+0x94/0xa6 [kvm] ra : __kvm_write_guest_page+0x54/0xa6 [kvm] epc : ffffffff01590e98 ra : ffffffff01590e58 sp : ffff8f80001f39b0 gp : ffffffff81512a60 tp : ffffaf80024872c0 t0 : ffffaf800247e000 t1 : 00000000000007e0 t2 : 0000000000000000 s0 : ffff8f80001f39f0 s1 : 00007fff89ac4000 a0 : ffffffff015dd7e8 a1 : 0000000000000086 a2 : 0000000000000000 a3 : ffffaf8000000000 a4 : ffffaf80024882c0 a5 : 0000000000000000 a6 : ffffaf800328d780 a7 : 00000000000001cc s2 : ffffaf800197bd00 s3 : 00000000000828c4 s4 : ffffaf800248c000 s5 : ffffaf800247d000 s6 : 0000000000001000 s7 : 0000000000001000 s8 : 0000000000000000 s9 : 00007fff861fd500 s10: 0000000000000001 s11: 0000000000800000 t3 : 00000000000004d3 t4 : 00000000000004d3 t5 : ffffffff814126e0 t6 : ffffffff81412700 status: 0000000200000120 badaddr: 0000000000000508 cause: 000000000000000d [<ffffffff01590e98>] __kvm_write_guest_page+0x94/0xa6 [kvm] [<ffffffff015943a6>] kvm_vcpu_write_guest+0x56/0x90 [kvm] [<ffffffff015a175c>] kvm_pmu_clear_snapshot_area+0x42/0x7e [kvm] [<ffffffff015a1972>] kvm_riscv_vcpu_pmu_deinit.part.0+0xe0/0x14e [kvm] [<ffffffff015a2ad0>] kvm_riscv_vcpu_pmu_deinit+0x1a/0x24 [kvm] [<ffffffff0159b344>] kvm_arch_vcpu_destroy+0x28/0x4c [kvm] [<ffffffff0158e420>] kvm_destroy_vcpus+0x5a/0xda [kvm] [<ffffffff0159930c>] kvm_arch_destroy_vm+0x14/0x28 [kvm] [<ffffffff01593260>] kvm_destroy_vm+0x168/0x2a0 [kvm] [<ffffffff015933d4>] kvm_put_kvm+0x3c/0x58 [kvm] [<ffffffff01593412>] kvm_vm_release+0x22/0x2e [kvm] Clearly, the kvm_vcpu_write_guest() function is crashing because it is being called from kvm_pmu_clear_snapshot_area() upon guest tear down. To address the above issue, simplify the kvm_pmu_clear_snapshot_area() to not zero-out PMU snapshot area from kvm_pmu_clear_snapshot_area() because the guest is anyway being tore down. The kvm_pmu_clear_snapshot_area() is also called when guest changes PMU snapshot area of a VCPU but even in this case the previous PMU snaphsot area must not be zeroed-out because the guest might have reclaimed the pervious PMU snapshot area for some other purpose.
Impacted products
Vendor Product Version
Linux Linux Version: c2f41ddbcdd75689d9f512638a40263e3127be93
Version: c2f41ddbcdd75689d9f512638a40263e3127be93
Version: c2f41ddbcdd75689d9f512638a40263e3127be93
Create a notification for this product.
   Linux Linux Version: 6.10
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-47717",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-21T13:02:30.490635Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-21T13:04:18.168Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/kvm/vcpu_pmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "81aa95fd5bd14ff49617f07fa79a8d1f1cf2ce9a",
              "status": "affected",
              "version": "c2f41ddbcdd75689d9f512638a40263e3127be93",
              "versionType": "git"
            },
            {
              "lessThan": "6d0a5dcfc78bd18f2abb9641f83380135494559b",
              "status": "affected",
              "version": "c2f41ddbcdd75689d9f512638a40263e3127be93",
              "versionType": "git"
            },
            {
              "lessThan": "47d40d93292d9cff8dabb735bed83d930fa03950",
              "status": "affected",
              "version": "c2f41ddbcdd75689d9f512638a40263e3127be93",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/kvm/vcpu_pmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.10"
            },
            {
              "lessThan": "6.10",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: KVM: Don\u0027t zero-out PMU snapshot area before freeing data\n\nWith the latest Linux-6.11-rc3, the below NULL pointer crash is observed\nwhen SBI PMU snapshot is enabled for the guest and the guest is forcefully\npowered-off.\n\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000508\n  Oops [#1]\n  Modules linked in: kvm\n  CPU: 0 UID: 0 PID: 61 Comm: term-poll Not tainted 6.11.0-rc3-00018-g44d7178dd77a #3\n  Hardware name: riscv-virtio,qemu (DT)\n  epc : __kvm_write_guest_page+0x94/0xa6 [kvm]\n   ra : __kvm_write_guest_page+0x54/0xa6 [kvm]\n  epc : ffffffff01590e98 ra : ffffffff01590e58 sp : ffff8f80001f39b0\n   gp : ffffffff81512a60 tp : ffffaf80024872c0 t0 : ffffaf800247e000\n   t1 : 00000000000007e0 t2 : 0000000000000000 s0 : ffff8f80001f39f0\n   s1 : 00007fff89ac4000 a0 : ffffffff015dd7e8 a1 : 0000000000000086\n   a2 : 0000000000000000 a3 : ffffaf8000000000 a4 : ffffaf80024882c0\n   a5 : 0000000000000000 a6 : ffffaf800328d780 a7 : 00000000000001cc\n   s2 : ffffaf800197bd00 s3 : 00000000000828c4 s4 : ffffaf800248c000\n   s5 : ffffaf800247d000 s6 : 0000000000001000 s7 : 0000000000001000\n   s8 : 0000000000000000 s9 : 00007fff861fd500 s10: 0000000000000001\n   s11: 0000000000800000 t3 : 00000000000004d3 t4 : 00000000000004d3\n   t5 : ffffffff814126e0 t6 : ffffffff81412700\n  status: 0000000200000120 badaddr: 0000000000000508 cause: 000000000000000d\n  [\u003cffffffff01590e98\u003e] __kvm_write_guest_page+0x94/0xa6 [kvm]\n  [\u003cffffffff015943a6\u003e] kvm_vcpu_write_guest+0x56/0x90 [kvm]\n  [\u003cffffffff015a175c\u003e] kvm_pmu_clear_snapshot_area+0x42/0x7e [kvm]\n  [\u003cffffffff015a1972\u003e] kvm_riscv_vcpu_pmu_deinit.part.0+0xe0/0x14e [kvm]\n  [\u003cffffffff015a2ad0\u003e] kvm_riscv_vcpu_pmu_deinit+0x1a/0x24 [kvm]\n  [\u003cffffffff0159b344\u003e] kvm_arch_vcpu_destroy+0x28/0x4c [kvm]\n  [\u003cffffffff0158e420\u003e] kvm_destroy_vcpus+0x5a/0xda [kvm]\n  [\u003cffffffff0159930c\u003e] kvm_arch_destroy_vm+0x14/0x28 [kvm]\n  [\u003cffffffff01593260\u003e] kvm_destroy_vm+0x168/0x2a0 [kvm]\n  [\u003cffffffff015933d4\u003e] kvm_put_kvm+0x3c/0x58 [kvm]\n  [\u003cffffffff01593412\u003e] kvm_vm_release+0x22/0x2e [kvm]\n\nClearly, the kvm_vcpu_write_guest() function is crashing because it is\nbeing called from kvm_pmu_clear_snapshot_area() upon guest tear down.\n\nTo address the above issue, simplify the kvm_pmu_clear_snapshot_area() to\nnot zero-out PMU snapshot area from kvm_pmu_clear_snapshot_area() because\nthe guest is anyway being tore down.\n\nThe kvm_pmu_clear_snapshot_area() is also called when guest changes\nPMU snapshot area of a VCPU but even in this case the previous PMU\nsnaphsot area must not be zeroed-out because the guest might have\nreclaimed the pervious PMU snapshot area for some other purpose."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:26:42.988Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/81aa95fd5bd14ff49617f07fa79a8d1f1cf2ce9a"
        },
        {
          "url": "https://git.kernel.org/stable/c/6d0a5dcfc78bd18f2abb9641f83380135494559b"
        },
        {
          "url": "https://git.kernel.org/stable/c/47d40d93292d9cff8dabb735bed83d930fa03950"
        }
      ],
      "title": "RISC-V: KVM: Don\u0027t zero-out PMU snapshot area before freeing data",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-47717",
    "datePublished": "2024-10-21T11:53:48.181Z",
    "dateReserved": "2024-09-30T16:00:12.949Z",
    "dateUpdated": "2024-12-19T09:26:42.988Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-47717\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-10-21T12:15:08.020\",\"lastModified\":\"2024-10-24T14:32:20.817\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nRISC-V: KVM: Don\u0027t zero-out PMU snapshot area before freeing data\\n\\nWith the latest Linux-6.11-rc3, the below NULL pointer crash is observed\\nwhen SBI PMU snapshot is enabled for the guest and the guest is forcefully\\npowered-off.\\n\\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000508\\n  Oops [#1]\\n  Modules linked in: kvm\\n  CPU: 0 UID: 0 PID: 61 Comm: term-poll Not tainted 6.11.0-rc3-00018-g44d7178dd77a #3\\n  Hardware name: riscv-virtio,qemu (DT)\\n  epc : __kvm_write_guest_page+0x94/0xa6 [kvm]\\n   ra : __kvm_write_guest_page+0x54/0xa6 [kvm]\\n  epc : ffffffff01590e98 ra : ffffffff01590e58 sp : ffff8f80001f39b0\\n   gp : ffffffff81512a60 tp : ffffaf80024872c0 t0 : ffffaf800247e000\\n   t1 : 00000000000007e0 t2 : 0000000000000000 s0 : ffff8f80001f39f0\\n   s1 : 00007fff89ac4000 a0 : ffffffff015dd7e8 a1 : 0000000000000086\\n   a2 : 0000000000000000 a3 : ffffaf8000000000 a4 : ffffaf80024882c0\\n   a5 : 0000000000000000 a6 : ffffaf800328d780 a7 : 00000000000001cc\\n   s2 : ffffaf800197bd00 s3 : 00000000000828c4 s4 : ffffaf800248c000\\n   s5 : ffffaf800247d000 s6 : 0000000000001000 s7 : 0000000000001000\\n   s8 : 0000000000000000 s9 : 00007fff861fd500 s10: 0000000000000001\\n   s11: 0000000000800000 t3 : 00000000000004d3 t4 : 00000000000004d3\\n   t5 : ffffffff814126e0 t6 : ffffffff81412700\\n  status: 0000000200000120 badaddr: 0000000000000508 cause: 000000000000000d\\n  [\u003cffffffff01590e98\u003e] __kvm_write_guest_page+0x94/0xa6 [kvm]\\n  [\u003cffffffff015943a6\u003e] kvm_vcpu_write_guest+0x56/0x90 [kvm]\\n  [\u003cffffffff015a175c\u003e] kvm_pmu_clear_snapshot_area+0x42/0x7e [kvm]\\n  [\u003cffffffff015a1972\u003e] kvm_riscv_vcpu_pmu_deinit.part.0+0xe0/0x14e [kvm]\\n  [\u003cffffffff015a2ad0\u003e] kvm_riscv_vcpu_pmu_deinit+0x1a/0x24 [kvm]\\n  [\u003cffffffff0159b344\u003e] kvm_arch_vcpu_destroy+0x28/0x4c [kvm]\\n  [\u003cffffffff0158e420\u003e] kvm_destroy_vcpus+0x5a/0xda [kvm]\\n  [\u003cffffffff0159930c\u003e] kvm_arch_destroy_vm+0x14/0x28 [kvm]\\n  [\u003cffffffff01593260\u003e] kvm_destroy_vm+0x168/0x2a0 [kvm]\\n  [\u003cffffffff015933d4\u003e] kvm_put_kvm+0x3c/0x58 [kvm]\\n  [\u003cffffffff01593412\u003e] kvm_vm_release+0x22/0x2e [kvm]\\n\\nClearly, the kvm_vcpu_write_guest() function is crashing because it is\\nbeing called from kvm_pmu_clear_snapshot_area() upon guest tear down.\\n\\nTo address the above issue, simplify the kvm_pmu_clear_snapshot_area() to\\nnot zero-out PMU snapshot area from kvm_pmu_clear_snapshot_area() because\\nthe guest is anyway being tore down.\\n\\nThe kvm_pmu_clear_snapshot_area() is also called when guest changes\\nPMU snapshot area of a VCPU but even in this case the previous PMU\\nsnaphsot area must not be zeroed-out because the guest might have\\nreclaimed the pervious PMU snapshot area for some other purpose.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: RISC-V: KVM: No ponga a cero el \u00e1rea de instant\u00e1neas de PMU antes de liberar los datos. Con la \u00faltima versi\u00f3n Linux-6.11-rc3, se observa el siguiente bloqueo del puntero NULL cuando la instant\u00e1nea de SBI PMU est\u00e1 habilitada para el invitado y el invitado se apaga a la fuerza. No se puede manejar la desreferencia del puntero NULL del n\u00facleo en la direcci\u00f3n virtual 0000000000000508 Ups [#1] M\u00f3dulos vinculados: kvm CPU: 0 UID: 0 PID: 61 Comm: term-poll No contaminado 6.11.0-rc3-00018-g44d7178dd77a #3 Nombre del hardware: riscv-virtio,qemu (DT) epc : __kvm_write_guest_page+0x94/0xa6 [kvm] ra : __kvm_write_guest_page+0x54/0xa6 [kvm] epc : ffffffff01590e98 ra : ffffffff01590e58 sp : ffff8f80001f39b0 gp : ffffffff81512a60 tp: ffffaf80024872c0 t0: ffffaf800247e000 t1: 00000000000007e0 t2: 00000000000000000 s0: ffff8f80001f39f0 s1: 00007fff89ac40 00 a0: ffffffff015dd7e8 a1: 0000000000000086 a2: 0000000000000000 a3: ffffaf8000000000 a4: ffffaf80024882c0 a5: 0000000000000000 a6: ffffaf800328d780 a7: 00000000000001cc s2: ffffaf800197bd00 s3: 00000000000828c4 s4: ffffaf800248c000 s5: 7d000 s6: 0000000000001000 s7: 0000000000001000 s8: 0000000000000000 s9: 00007fff861fd500 s10: 0000000000000001 s11: 0000000000800000 t3 : 00000000000004d3 t4 : 000000000000004d3 t5 : ffffffff814126e0 t6 : ffffffff81412700 estado: 0000000200000120 direcci\u00f3n incorrecta: 0000000000000508 causa: 000000000000000d [] __kvm_write_guest_page+0x94/0xa6 [kvm] [] kvm_vcpu_write_guest+0x56/0x90 [kvm] [] kvm_pmu_clear_snapshot_area+0x42/0x7e [kvm] [] kvm_riscv_vcpu_pmu_deinit.part.0+0xe0/0x14e [kvm] [] kvm_riscv_vcpu_pmu_deinit+0x1a/0x24 [kvm] [] kvm_arch_vcpu_destroy+0x28/0x4c [kvm] [] kvm_destroy_vcpus+0x5a/0xda [kvm] [] kvm_arch_destroy_vm+0x14/0x28 [kvm] [] kvm_destroy_vm+0x168/0x2a0 [kvm] [] kvm_put_kvm+0x3c/0x58 [kvm] [] kvm_vm_release+0x22/0x2e [kvm] Claramente, la funci\u00f3n kvm_vcpu_write_guest() falla porque se la llama desde kvm_pmu_clear_snapshot_area() al desmantelar el invitado. Para solucionar el problema anterior, simplifique kvm_pmu_clear_snapshot_area() para que no ponga a cero el \u00e1rea de instant\u00e1neas de PMU de kvm_pmu_clear_snapshot_area() porque, de todos modos, el invitado se est\u00e1 desmantelando. Tambi\u00e9n se llama a kvm_pmu_clear_snapshot_area() cuando el invitado cambia el \u00e1rea de instant\u00e1neas de PMU de una VCPU, pero incluso en este caso, el \u00e1rea de instant\u00e1neas de PMU anterior no debe ponerse a cero porque el invitado podr\u00eda haber recuperado el \u00e1rea de instant\u00e1neas de PMU anterior para alg\u00fan otro prop\u00f3sito.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.10\",\"versionEndExcluding\":\"6.10.13\",\"matchCriteriaId\":\"767D4D2D-C6E7-4B7D-9446-CFC8F8FF2FBB\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.11\",\"versionEndExcluding\":\"6.11.2\",\"matchCriteriaId\":\"AB755D26-97F4-43B6-8604-CD076811E181\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/47d40d93292d9cff8dabb735bed83d930fa03950\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6d0a5dcfc78bd18f2abb9641f83380135494559b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/81aa95fd5bd14ff49617f07fa79a8d1f1cf2ce9a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-47717\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-10-21T13:02:30.490635Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-21T13:02:33.626Z\"}}], \"cna\": {\"title\": \"RISC-V: KVM: Don\u0027t zero-out PMU snapshot area before freeing data\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c2f41ddbcdd75689d9f512638a40263e3127be93\", \"lessThan\": \"81aa95fd5bd14ff49617f07fa79a8d1f1cf2ce9a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c2f41ddbcdd75689d9f512638a40263e3127be93\", \"lessThan\": \"6d0a5dcfc78bd18f2abb9641f83380135494559b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c2f41ddbcdd75689d9f512638a40263e3127be93\", \"lessThan\": \"47d40d93292d9cff8dabb735bed83d930fa03950\", \"versionType\": \"git\"}], \"programFiles\": [\"arch/riscv/kvm/vcpu_pmu.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.10\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.10\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.10.13\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.11.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"arch/riscv/kvm/vcpu_pmu.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/81aa95fd5bd14ff49617f07fa79a8d1f1cf2ce9a\"}, {\"url\": \"https://git.kernel.org/stable/c/6d0a5dcfc78bd18f2abb9641f83380135494559b\"}, {\"url\": \"https://git.kernel.org/stable/c/47d40d93292d9cff8dabb735bed83d930fa03950\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nRISC-V: KVM: Don\u0027t zero-out PMU snapshot area before freeing data\\n\\nWith the latest Linux-6.11-rc3, the below NULL pointer crash is observed\\nwhen SBI PMU snapshot is enabled for the guest and the guest is forcefully\\npowered-off.\\n\\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000508\\n  Oops [#1]\\n  Modules linked in: kvm\\n  CPU: 0 UID: 0 PID: 61 Comm: term-poll Not tainted 6.11.0-rc3-00018-g44d7178dd77a #3\\n  Hardware name: riscv-virtio,qemu (DT)\\n  epc : __kvm_write_guest_page+0x94/0xa6 [kvm]\\n   ra : __kvm_write_guest_page+0x54/0xa6 [kvm]\\n  epc : ffffffff01590e98 ra : ffffffff01590e58 sp : ffff8f80001f39b0\\n   gp : ffffffff81512a60 tp : ffffaf80024872c0 t0 : ffffaf800247e000\\n   t1 : 00000000000007e0 t2 : 0000000000000000 s0 : ffff8f80001f39f0\\n   s1 : 00007fff89ac4000 a0 : ffffffff015dd7e8 a1 : 0000000000000086\\n   a2 : 0000000000000000 a3 : ffffaf8000000000 a4 : ffffaf80024882c0\\n   a5 : 0000000000000000 a6 : ffffaf800328d780 a7 : 00000000000001cc\\n   s2 : ffffaf800197bd00 s3 : 00000000000828c4 s4 : ffffaf800248c000\\n   s5 : ffffaf800247d000 s6 : 0000000000001000 s7 : 0000000000001000\\n   s8 : 0000000000000000 s9 : 00007fff861fd500 s10: 0000000000000001\\n   s11: 0000000000800000 t3 : 00000000000004d3 t4 : 00000000000004d3\\n   t5 : ffffffff814126e0 t6 : ffffffff81412700\\n  status: 0000000200000120 badaddr: 0000000000000508 cause: 000000000000000d\\n  [\u003cffffffff01590e98\u003e] __kvm_write_guest_page+0x94/0xa6 [kvm]\\n  [\u003cffffffff015943a6\u003e] kvm_vcpu_write_guest+0x56/0x90 [kvm]\\n  [\u003cffffffff015a175c\u003e] kvm_pmu_clear_snapshot_area+0x42/0x7e [kvm]\\n  [\u003cffffffff015a1972\u003e] kvm_riscv_vcpu_pmu_deinit.part.0+0xe0/0x14e [kvm]\\n  [\u003cffffffff015a2ad0\u003e] kvm_riscv_vcpu_pmu_deinit+0x1a/0x24 [kvm]\\n  [\u003cffffffff0159b344\u003e] kvm_arch_vcpu_destroy+0x28/0x4c [kvm]\\n  [\u003cffffffff0158e420\u003e] kvm_destroy_vcpus+0x5a/0xda [kvm]\\n  [\u003cffffffff0159930c\u003e] kvm_arch_destroy_vm+0x14/0x28 [kvm]\\n  [\u003cffffffff01593260\u003e] kvm_destroy_vm+0x168/0x2a0 [kvm]\\n  [\u003cffffffff015933d4\u003e] kvm_put_kvm+0x3c/0x58 [kvm]\\n  [\u003cffffffff01593412\u003e] kvm_vm_release+0x22/0x2e [kvm]\\n\\nClearly, the kvm_vcpu_write_guest() function is crashing because it is\\nbeing called from kvm_pmu_clear_snapshot_area() upon guest tear down.\\n\\nTo address the above issue, simplify the kvm_pmu_clear_snapshot_area() to\\nnot zero-out PMU snapshot area from kvm_pmu_clear_snapshot_area() because\\nthe guest is anyway being tore down.\\n\\nThe kvm_pmu_clear_snapshot_area() is also called when guest changes\\nPMU snapshot area of a VCPU but even in this case the previous PMU\\nsnaphsot area must not be zeroed-out because the guest might have\\nreclaimed the pervious PMU snapshot area for some other purpose.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-12-19T09:26:42.988Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-47717\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-12-19T09:26:42.988Z\", \"dateReserved\": \"2024-09-30T16:00:12.949Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-10-21T11:53:48.181Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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.