summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorAbdifatah Suruur <suruurism@gmail.com>2026-09-29 12:48:44 +0300
committerAlex Williamson <alex@shazbot.org>2026-09-29 13:30:56 -0600
commit9c5cd385d295fa8621dff0e9f6063e3f6ff24159 (patch)
tree706519e21d66cddafe3b61a98608522368a62757 /tools/perf/scripts/python/stackcollapse.py
parent25fd8b27ee8d4f59cc2ad99cf67aef4570b82096 (diff)
downloadlinux-next-9c5cd385d295fa8621dff0e9f6063e3f6ff24159.tar.gz
linux-next-9c5cd385d295fa8621dff0e9f6063e3f6ff24159.zip
vfio/cdx: prevent read-only region mappings from becoming writable
vfio_cdx_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(), writing to MMIO regions the device marks read-only. 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 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. Fixes: 234489ac56130 ("vfio/cdx: add support for CDX bus") Signed-off-by: Abdifatah Suruur <suruurism@gmail.com> Link: https://lore.kernel.org/r/20260929094848.7439-4-suruurism@gmail.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions