summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAbdifatah Suruur <suruurism@gmail.com>2026-09-29 12:48:42 +0300
committerAlex Williamson <alex@shazbot.org>2026-09-29 13:30:13 -0600
commit420bed9131dbbe37abe9d6b32af51219875811e0 (patch)
treeb79f49b5a1ebfb4b628aa0adcc5018b51f7a6eda /tools/perf/scripts/python
parenta1c1731c24e9852af872ddb0c394b8006d04af77 (diff)
downloadlinux-next-420bed9131dbbe37abe9d6b32af51219875811e0.tar.gz
linux-next-420bed9131dbbe37abe9d6b32af51219875811e0.zip
vfio/platform: prevent read-only region mappings from becoming writable
vfio_platform_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(). Clear VM_MAYWRITE 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 platform driver 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. Fixes: fad4d5b1f042 ("vfio/platform: support MMAP of MMIO regions") Reviewed-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Signed-off-by: Abdifatah Suruur <suruurism@gmail.com> Link: https://lore.kernel.org/r/20260929094848.7439-2-suruurism@gmail.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions