OrangePi_CM5/net/9p
Juergen Gross 8357d75bfd xen/9p: use alloc/free_pages_exact()
Commit 5cadd4bb1d7fc9ab201ac14620d1a478357e4ebd upstream.

Instead of __get_free_pages() and free_pages() use alloc_pages_exact()
and free_pages_exact(). This is in preparation of a change of
gnttab_end_foreign_access() which will prohibit use of high-order
pages.

By using the local variable "order" instead of ring->intf->ring_order
in the error path of xen_9pfs_front_alloc_dataring() another bug is
fixed, as the error path can be entered before ring->intf->ring_order
is being set.

By using alloc_pages_exact() the size in bytes is specified for the
allocation, which fixes another bug for the case of
order < (PAGE_SHIFT - XEN_PAGE_SHIFT).

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-11 12:11:54 +01:00
..
Kconfig
…
Makefile
…
client.c 9p/net: fix missing error check in p9_check_errors 2021-11-18 14:04:29 +01:00
error.c
…
mod.c
…
protocol.c
…
protocol.h
…
trans_common.c
…
trans_common.h
…
trans_fd.c
…
trans_rdma.c
…
trans_virtio.c 9p/trans_virtio: Remove sysfs file on probe failure 2021-09-26 14:08:57 +02:00
trans_xen.c xen/9p: use alloc/free_pages_exact() 2022-03-11 12:11:54 +01:00