CVE-2026-99811: vfio/cdx: prevent read-only region mappings from becoming writable
In the Linux kernel, the following vulnerability has been resolved:
vfio/cdx: prevent read-only region mappings from becoming writable
vfiocdxmmap() rejects writable mappings of regions without the WRITE flag, but leaves VMMAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(), writing to MMIO regions the device marks read-only.
Clear VMMAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable").
Note this is defensive hardening: no in-tree cdx device currently publishes a region without the WRITE flag. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Clear VM_MAYWRITE for regions without the WRITE flag to prevent writable mappings of read-only regions.
vfio/cdx VM_MAYWRITE = clear for regions without the WRITE flag
Event History
Frequently Asked Questions
Are systems using current in-tree CDX devices exposed in practice?
No in-tree CDX device currently publishes a region without the WRITE flag, so the issue is described as defensive hardening rather than a currently reachable exposure for those devices.
What would be required to exploit this issue if a read-only CDX region were published?
A userspace process would need to map the region read-only through vfio_cdx_mmap() and then use mprotect() to upgrade that mapping to writable. This could permit writes to an MMIO region that the device marked read-only.
How can I determine whether this affects a CDX device deployment?
Determine whether the device publishes any VFIO CDX region without the WRITE flag. The described bypass is relevant only for such read-only regions.