KernelScan.io

HIGH Introduced in 6.8

kvm MemslotFlags Escape

CVE-2026-89908

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

KernelScan AI8.1HIGH

01

In the Linux kernel, the following vulnerability has been resolved: LoongArch: KVM: Preserve memslot arch flags on KVM_MR_FLAGS_ONLY kvm_arch_prepare_memory_region() computes new->arch.flags, i.e. whether a memslot is KVM_MEM_HUGEPAGE_CAPABLE or KVM_MEM_HUGEPAGE_INCAPABLE, only for KVM_MR_CREATE and KVM_MR_MOVE, and returns early for every other change. But the generic code allocates a zeroed memslot for every change and never copies old->arch, so after a KVM_MR_FLAGS_ONLY update, e.g. toggling KVM_MEM_LOG_DIRTY_PAGES for live migration, the active memslot has arch.flags == 0. With both flags clear, fault_supports_huge_mapping() falls through to the alignment check on the HVA range alone, which no longer verifies that the GPA and HVA have the same offset within a PMD. A memslot that was marked KVM_MEM_HUGEPAGE_INCAPABLE because of a GPA/HVA offset mismatch can then be mapped with PMD entries on read faults, and since kvm_map_page() aligns the gfn and the pfn independently, the guest ends up accessing the wrong host pages, exactly the "d -> f, e -> g" case described in the comment above the check. Carry the arch flags over from the old memslot for KVM_MR_FLAGS_ONLY, as the GPA, HVA and size are guaranteed to be unchanged for that case.

02

Engine v0.6.0

Risk summary

A guest VM on a LoongArch KVM host can access incorrect host pages when dirty logging is toggled on a memory slot, because architecture-specific hugepage flags are lost during the update. This allows the guest to read and write host memory outside its assigned region, potentially leaking or corrupting host or other VM data.

Affectedarch/loongarch/kvm/mmu.c (LoongArch KVM)

Vulnerability analysis

When a KVM memory slot is updated to toggle dirty logging (as during live migration), the LoongArch KVM code fails to preserve architecture-specific flags that record whether the slot supports huge page mappings. With these flags cleared, the huge page alignment check is bypassed, and the guest can be mapped to incorrect host pages through huge page entries, giving the guest access to host memory it should not reach. The fix carries the architecture flags forward from the previous memslot when only the userspace-visible flags change, since the address layout is unchanged in that case. This vulnerability is reachable only on LoongArch systems running KVM, and requires a guest VM whose host has toggled dirty logging on a memory slot with a specific guest-to-host address offset mismatch.

03

BranchIntroducedFixed inPatch commit
6.126.86.12.1107c6df65b5384
6.186.86.18.514e4dbc341b15
7.26.87.2.5bc7a6849b439
mainline6.87.327a9bfee3bbc
cip/6.126.86.12.111-cip327c6df65b5384

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32