linux/include/hyperv
Stanislav Kinsburskii 16cbec2489 mshv: Fix infinite fault loop on permission-denied GPA intercepts
Prevent infinite fault loops when guests access memory regions without
proper permissions. Currently, mshv_handle_gpa_intercept() attempts to
remap pages for all faults on movable memory regions, regardless of
whether the access type is permitted. When a guest writes to a read-only
region, the remap succeeds but the region remains read-only, causing
immediate re-fault and spinning the vCPU indefinitely.

Validate intercept access type against region permissions before
attempting remaps. Reject writes to non-writable regions and executes to
non-executable regions early, returning false to let the VMM handle the
intercept appropriately.

This also closes a potential DoS vector where malicious guests could
intentionally trigger these fault loops to consume host resources.

Fixes: b9a66cd5cc ("mshv: Add support for movable memory regions")
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2026-04-04 05:25:53 +00:00
..
hvgdk.h KVM: SVM: Treat exit_code as an unsigned 64-bit value through all of KVM 2026-01-13 17:37:03 -08:00
hvgdk_ext.h
hvgdk_mini.h mshv: Fix infinite fault loop on permission-denied GPA intercepts 2026-04-04 05:25:53 +00:00
hvhdk.h mshv: Fix infinite fault loop on permission-denied GPA intercepts 2026-04-04 05:25:53 +00:00
hvhdk_mini.h mshv: Handle insufficient contiguous memory hypervisor status 2026-02-19 06:39:16 +00:00