# CVE-2026-46171: riscv: kvm: fix vector context allocation leak

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-05-28T09:36:25.966Z
- Modified: 2026-10-21T13:19:04.527Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

riscv: kvm: fix vector context allocation leak

When the second kzalloc (host_context.vector.datap) fails in
kvm_riscv_vcpu_alloc_vector_context, the first allocation
(guest_context.vector.datap) is leaked. Free it before returning.

(As written by CVE List.)

## Affected

- Linux Linux: from 0f4b82579716b12bb88257bd7ea80f25c791fb2c before 8f3a5dc4055e1001b44ca8ae2bd3eb1d07782049; from 0f4b82579716b12bb88257bd7ea80f25c791fb2c before 70ecebe7c58ce01f8da3f513eafb51bd147b1e63; from 0f4b82579716b12bb88257bd7ea80f25c791fb2c before bd62c0f61bc722a097417401030c596cea8e21aa; from 0f4b82579716b12bb88257bd7ea80f25c791fb2c before 1d57ab45ec5c0e22789de793bcf2a31ad6fb7d98; from 0f4b82579716b12bb88257bd7ea80f25c791fb2c before b7c958d7c1eb1cb9b2be7b5ee4129fcd66cec978; 6.5 (not affected: before 6.5; from 6.6.160 up to 6.6.*; from 6.12.114 up to 6.12.*; from 6.18.30 up to 6.18.*; from 7.0.7 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.5 before 6.18.30; from 6.19 before 7.0.7

## References

- <https://git.kernel.org/stable/c/8f3a5dc4055e1001b44ca8ae2bd3eb1d07782049>
- <https://git.kernel.org/stable/c/70ecebe7c58ce01f8da3f513eafb51bd147b1e63>
- <https://git.kernel.org/stable/c/bd62c0f61bc722a097417401030c596cea8e21aa> (patch)
- <https://git.kernel.org/stable/c/1d57ab45ec5c0e22789de793bcf2a31ad6fb7d98> (patch)
- <https://git.kernel.org/stable/c/b7c958d7c1eb1cb9b2be7b5ee4129fcd66cec978> (patch)

## Sources

- CVE List: [CVE-2026-46171](https://www.cve.org/CVERecord?id=CVE-2026-46171), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2026-46171](https://nvd.nist.gov/vuln/detail/CVE-2026-46171), Public domain, modified 2026-10-21

---

Page: https://cve.day/CVE-2026-46171 · Whole record: https://cve.day/CVE-2026-46171.json · Rebuilt by cve.day 2026-11-25T22:59:22.836Z
