CVE-2026-89775 PUBLISHED

KVM: arm64: Handle negative S1 walk levels in VNCR TLB size evaluation

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

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

KVM: arm64: Handle negative S1 walk levels in VNCR TLB size evaluation

Computing the effects of a TLB invalidation involves looking at the size of the mapping cached by the TLB. For S1 mappings such as VNCR, this is deducted from the combination of the base granule size and the mapping level.

However, this implies that the S1 MMU is on. When the MMU is off, we indicate this with the level being set to a "creative" value of -127 (S1_MMU_DISABLED).

This ends-up being misinterpreted by pgshift_level_to_ttl() as it doesn't handle negative levels at all (the level is immediately cast to a u8 and only the bottom two bits considered), leading to an invalidation size of 0. Not helpful.

Tidy-up pgshift_level_to_ttl() to handle these negative levels, and ttl_to_size() to always return SZ_1G when no valid TTL is present. This allows the removal of open-coded checks for similar situations.

Note that the check for a negative value not explicitely checking for S1_MMU_DISABLED is deliberate, so that actual negative levels introduced with LVA2 and D128 can take the same path if we ever support them.

Metrics

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

AV:L - A nested arm64 L1 hypervisor reaches the bug via KVM_RUN when host KVM handles VNCR_EL2 TLB invalidation (MMU notifiers, memslot unmap, or guest EL2 TLBI into kvm_invalidate_vncr_ipa/invalidate_vncr_va). This is local KVM ioctl/guest execution, not a network, adjacent-radio, or physical-device path. AC:L - An L1 guest deterministically clears SCTLR_EL2.M and programs TCR_EL2.TG0 to 16KB or 64KB so S1_MMU_DISABLED (-127) is mis-cast as walk level 1 and ttl_to_size() returns 0, skipping all VNCR invalidation. Nested virt on arm64 cloud hosts is an attacker-selectable deployment, not an uncontrollable race. PR:N - Exploitation requires no host root or init-namespace capabilities beyond running hypervisor code in a tenant KVM guest on an arm64 host with nested virtualization enabled; the attacker operates entirely from within their assigned VM, consistent with other arm64 KVM nested-virt CVE scoring. UI:N - No victim user or administrator action is required beyond the attacker operating their own nested-virtualization workload; SCTLR/TCR setup, VNCR faults, guest TLBI, and balloon or memslot-unmap MMU notifiers are fully attacker-driven. S:C - Missed VNCR invalidation leaves a writable host per-CPU fixmap covering a guest IPA after the backing page is unmapped, so host KVM keeps reading and writing reused host physical pages while emulating EL2 register state, crossing the guest-to-hypervisor security boundary. C:H - The stale VNCR pseudo-TLB retains the old HPA and is remapped with PAGE_KERNEL; after MMU-notifier unmap the host reads reused pages through the fixmap during VNCR/sysreg emulation, yielding a use-after-free disclosure primitive across guest and host memory. I:H - Hardware NV2 and kvm_map_l1_vncr() keep a writable kernel mapping of the stale HPA, so nested EL2 register writes land in pages the host already freed and reused, giving a use-after-free write primitive against host kernel or co-resident memory. A:H - Accessing an unmapped or reused HPA through the VNCR fixmap can oops or panic the host kernel, and corrupting reused host pages can hang or crash the hypervisor and co-resident VMs; the attacker can retrigger the missed-invalidation sequence.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 7270cc9157f474dfc46750a34c9d7defc686b2eb to be54a70067c7dbe1381157e8a238fa4b16ea9c05 (excl.)
  • affected from 7270cc9157f474dfc46750a34c9d7defc686b2eb to 1c9fca34b9625a67a7f1a03c8604f3df760c6c49 (excl.)
  • affected from 7270cc9157f474dfc46750a34c9d7defc686b2eb to 8053393680d4fa3eb962667d2be95dd39f0940e5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.16 is affected
  • unaffected from 0 to 6.16 (excl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References