{"id":"CVE-2025-38367","state":"PUBLISHED","title":"LoongArch: KVM: Avoid overflow with array index","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: KVM: Avoid overflow with array index\n\nThe variable index is modified and reused as array index when modify\nregister EIOINTC_ENABLE. There will be array index overflow problem.","publishedAt":"2025-07-25T12:47:41.965Z","updatedAt":"2026-08-05T12:01:24.525Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3956a52bc05bd811082a3c9d2b423ee957e6fefc","status":"affected","lessThan":"2cc84c4b0d70d42e291862ecc848890d18e1004a","versionType":"git"},{"version":"3956a52bc05bd811082a3c9d2b423ee957e6fefc","status":"affected","lessThan":"080e8d2ecdfde588897aa8a87a8884061f4dbbbb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/kvm/intc/eiointc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.15.5","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/kvm/intc/eiointc.c"]}],"references":["https://git.kernel.org/stable/c/2cc84c4b0d70d42e291862ecc848890d18e1004a","https://git.kernel.org/stable/c/080e8d2ecdfde588897aa8a87a8884061f4dbbbb"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38367.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38367","state":"PUBLISHED","datePublished":"2025-07-25T12:47:41.965Z","dateUpdated":"2026-08-05T12:01:24.525Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.008Z"},"containers":{"cna":{"title":"LoongArch: KVM: Avoid overflow with array index","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: KVM: Avoid overflow with array index\n\nThe variable index is modified and reused as array index when modify\nregister EIOINTC_ENABLE. There will be array index overflow problem."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3956a52bc05bd811082a3c9d2b423ee957e6fefc","status":"affected","lessThan":"2cc84c4b0d70d42e291862ecc848890d18e1004a","versionType":"git"},{"version":"3956a52bc05bd811082a3c9d2b423ee957e6fefc","status":"affected","lessThan":"080e8d2ecdfde588897aa8a87a8884061f4dbbbb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/kvm/intc/eiointc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.15.5","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/kvm/intc/eiointc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2cc84c4b0d70d42e291862ecc848890d18e1004a"},{"url":"https://git.kernel.org/stable/c/080e8d2ecdfde588897aa8a87a8884061f4dbbbb"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached only by a guest vCPU executing a privileged `iocsrwr*` instruction against the in-kernel EIOINTC at IOCSR 0x1400, trapped locally on the host via `kvm_emu_iocsr()` → `kvm_io_bus_write()`. The attacker must be executing code on the physical host inside a VM, not sending network traffic.\nAC:L - A single deterministic 2/4/8-byte IOCSR write to offset 0x200–0x21f reproduces the out-of-bounds indexing every time, with no race, no timing window, and no dependence on memory layout the attacker cannot influence. The attacker also pre-seeds the out-of-bounds source bytes by writing the adjacent COREMAP/COREISR registers first.\nPR:L - IOCSR instructions require PLV0, so the attacker needs kernel privilege inside the guest — which is exactly what an ordinary cloud/virtualization tenant already possesses in its own VM, and no privilege at all on the host. From the host security authority being attacked, this is a low-privileged, untrusted principal.\nUI:N - The guest triggers the flaw entirely on its own by executing one instruction; no host operator, VMM action, or victim interaction is needed.\nS:C - The vulnerable component is the host kernel's KVM EIOINTC emulation, while the attacker's authority is confined to the guest; a guest-initiated write causes out-of-bounds accesses in host kernel memory, crossing the guest→hypervisor security boundary.\nC:H - Guest input causes the host kernel to read up to ~192 bytes beyond the 32-byte `enable`/`isr` arrays, and those out-of-bounds host-memory values directly determine which interrupts are asserted/deasserted, giving the guest an observable oracle over host kernel memory it is not entitled to read.\nI:H - Values harvested out of bounds are fed into `eiointc_enable_irq()`/`eiointc_update_irq()`, which then modify host-maintained state — `coreisr` words, `sw_coreisr` bitmaps, and queued vCPU interrupt-pending bits — so attacker-influenced out-of-bounds data corrupts host kernel interrupt-controller state and forces arbitrary interrupt injection/withdrawal.\nA:H - The corrupted indexing drives `eiointc_update_irq()` for IRQs the guest could not otherwise reach, where `kvm_get_vcpu(s->kvm, s->sw_coremap[irq])` can return NULL and `kvm_vcpu_ioctl_interrupt()` dereferences it while `eiointc->lock` is held with interrupts disabled, producing a host kernel oops/hang; even short of that, spurious or permanently lost interrupt delivery wedges the VM."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:01:24.525Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.15.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}