mirror of https://github.com/torvalds/linux.git
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:
|
||
|---|---|---|
| .. | ||
| hvgdk.h | ||
| hvgdk_ext.h | ||
| hvgdk_mini.h | ||
| hvhdk.h | ||
| hvhdk_mini.h | ||