{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-89513","id":"CVE-2026-89513","title":"RISC-V: KVM: Fix PMU event info array size overflow","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: KVM: Fix PMU event info array size overflow\n\nSBI PMU EVENT_GET_INFO stores guest-controlled num_events * sizeof(*einfo)\nin a 32-bit integer. On RV64, num_events = 0x10000001 makes 0x100000010\ntruncate to 16. KVM then allocates one entry but loops over the original\nnum_events, causing out-of-bounds reads and writes. A nest","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: KVM: Fix PMU event info array size overflow\n\nSBI PMU EVENT_GET_INFO stores guest-controlled num_events * sizeof(*einfo)\nin a 32-bit integer. On RV64, num_events = 0x10000001 makes 0x100000010\ntruncate to 16. KVM then allocates one entry but loops over the original\nnum_events, causing out-of-bounds reads and writes. A nested guest\ntriggered:\n\nBUG: KASAN: slab-out-of-bounds in kvm_riscv_vcpu_pmu_event_info+0xa4/0x142\nRead of size 4 at addr ff600000074d46b0 by task init/1\nCall Trace:\n[<ffffffff8006471c>] kvm_riscv_vcpu_pmu_event_info+0xa4/0x142\n[<ffffffff800690c0>] kvm_sbi_ext_pmu_handler+0xca/0x268\n[<ffffffff8006779e>] kvm_riscv_vcpu_sbi_ecall+0xec/0x1e6\n[<ffffffff8006008c>] kvm_riscv_vcpu_exit+0x48c/0x540\n[<ffffffff8005ea0a>] kvm_arch_vcpu_ioctl_run+0x37e/0xc80\nAllocated by task 1:\n __kmalloc_noprof+0x19e/0x4b0\n kvm_riscv_vcpu_pmu_event_info+0x72/0x142\n kvm_sbi_ext_pmu_handler+0xca/0x268\n kvm_riscv_vcpu_sbi_ecall+0xec/0x1e6\n kvm_riscv_vcpu_exit+0x48c/0x540\n kvm_arch_vcpu_ioctl_run+0x37e/0xc80\nThe buggy address is located 0 bytes to the right of\n allocated 16-byte region [ff600000074d46a0, ff600000074d46b0)\n\nStore the shared-memory size in size_t and reject multiplication overflow.\nAllocate the guest-driven array with GFP_KERNEL_ACCOUNT so it is charged\nto kmemcg, and use __GFP_NOWARN to suppress allocation failure warnings.\nUse kvcalloc() to allow vmalloc fallback and an unsigned long loop index\nto match num_events.","published":"2026-09-11T19:43:57.960Z","updated":"2026-10-28T02:30:24.632118441Z","reserved":"2026-09-11T19:38:34.717Z","status":"Received","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e309fd113b9f6c34672a487be08fecb7e12e7e29","lessThan":"ddbd71a3780942918a7d116d666313e5b3304d73","status":"affected","versionType":"git"},{"version":"e309fd113b9f6c34672a487be08fecb7e12e7e29","lessThan":"82088f88c96b99c27a974d09b02c2b133262fadf","status":"affected","versionType":"git"},{"version":"e309fd113b9f6c34672a487be08fecb7e12e7e29","lessThan":"735bc20c24187ca419c9d5e63860a54b91be34bd","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","lessThan":"6.18","status":"unaffected","versionType":"semver"},{"version":"6.18.57","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.2.4","lessThanOrEqual":"7.2.*","status":"unaffected","versionType":"semver"},{"version":"7.3","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/ddbd71a3780942918a7d116d666313e5b3304d73","tags":["web"]},{"url":"https://git.kernel.org/stable/c/82088f88c96b99c27a974d09b02c2b133262fadf","tags":["web"]},{"url":"https://git.kernel.org/stable/c/735bc20c24187ca419c9d5e63860a54b91be34bd","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89513.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89513","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00127,"epssPercentile":0.02454,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-89513","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89513","ok":true,"note":"Received"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-89513","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-89513","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}