mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
42baefac63
gnttab_end_foreign_access() is used to free a grant reference and optionally to free the associated page. In case the grant is still in use by the other side processing is being deferred. This leads to a problem in case no page to be freed is specified by the caller: the caller doesn't know that the page is still mapped by the other side and thus should not be used for other purposes. The correct way to handle this situation is to take an additional reference to the granted page in case handling is being deferred and to drop that reference when the grant reference could be freed finally. This requires that there are no users of gnttab_end_foreign_access() left directly repurposing the granted page after the call, as this might result in clobbered data or information leaks via the not yet freed grant reference. This is part of CVE-2022-23041 / XSA-396. Reported-by: Simon Gaiser <simon@invisiblethingslab.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> --- V4: - expand comment in header V5: - get page ref in case of kmalloc() failure, too |
||
---|---|---|
.. | ||
events | ||
xen-pciback | ||
xenbus | ||
xenfs | ||
acpi.c | ||
arm-device.c | ||
balloon.c | ||
biomerge.c | ||
cpu_hotplug.c | ||
dbgp.c | ||
efi.c | ||
evtchn.c | ||
features.c | ||
gntalloc.c | ||
gntdev-common.h | ||
gntdev-dmabuf.c | ||
gntdev-dmabuf.h | ||
gntdev.c | ||
grant-table.c | ||
Kconfig | ||
Makefile | ||
manage.c | ||
mcelog.c | ||
mem-reservation.c | ||
pci.c | ||
pcpu.c | ||
platform-pci.c | ||
privcmd-buf.c | ||
privcmd.c | ||
privcmd.h | ||
pvcalls-back.c | ||
pvcalls-front.c | ||
pvcalls-front.h | ||
swiotlb-xen.c | ||
sys-hypervisor.c | ||
time.c | ||
unpopulated-alloc.c | ||
xen-acpi-pad.c | ||
xen-acpi-processor.c | ||
xen-balloon.c | ||
xen-front-pgdir-shbuf.c | ||
xen-scsiback.c | ||
xlate_mmu.c |