linux-stable/drivers/net/hyperv
Andres Beltran a8c3209998 Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
Pointers to ring-buffer packets sent by Hyper-V are used within the
guest VM. Hyper-V can send packets with erroneous values or modify
packet fields after they are processed by the guest. To defend
against these scenarios, return a copy of the incoming VMBus packet
after validating its length and offset fields in hv_pkt_iter_first().
In this way, the packet can no longer be modified by the host.

Signed-off-by: Andres Beltran <lkmlabelt@gmail.com>
Co-developed-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: netdev@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20201208045311.10244-1-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2021-02-05 09:55:42 +00:00
..
hyperv_net.h Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer 2021-02-05 09:55:42 +00:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile hv_netvsc: Add XDP support 2020-01-25 10:43:19 +01:00
netvsc.c Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer 2021-02-05 09:55:42 +00:00
netvsc_bpf.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00
netvsc_drv.c use __netdev_notify_peers in hyperv 2020-12-16 11:43:26 -08:00
netvsc_trace.c
netvsc_trace.h
rndis_filter.c Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer 2021-02-05 09:55:42 +00:00