aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorLinfeng Sun <linfeng.sun.dev@gmail.com>2026-09-11 17:00:58 +0800
committerMichael S. Tsirkin <mst@redhat.com>2026-11-02 09:06:59 -0500
commit8517ed4429a2eefd002dce00ea46e23e6714350b (patch)
tree3ed368d905110dc3f823249f78832f0dd5f8dc23 /scripts/Makefile.thinlto
parentvirtio_ring: reset IN_ORDER state in virtqueue_init() (diff)
vdpa_sim: serialize IOTLB updates with dataplane access
The simulator translates IOTLB entries into iovecs or bvecs under iommu_lock, then drops the lock before copying data. A concurrent DMA unmap can delete the mapping and release its pinned backing pages while the copy is still in progress, leading to a UAF in _copy_from_iter(). Use the existing simulator mutex to serialize DMA map changes with the full backend work function. Also make vhost-vdpa stop device access before unpinning the backing pages. Otherwise, waiting in the simulator DMA unmap callback happens after the pages have already been released and cannot protect their lifetime. Keep iommu_lock for the IOTLB table itself and avoid adding a second long-lived lock to the simulator. I found this bug myself, though the patch was written with AI assistance. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Assisted-by: OpenAI-Codex:GPT-5 Signed-off-by: Linfeng Sun <linfeng.sun.dev@gmail.com> Message-ID: <20260911-fix-vdpa-iotlb-lifetime-v3-1-8766d371748e@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions