Messages in this thread | | | Date | Tue, 5 Jan 2021 12:45:30 +0000 | From | Wei Liu <> | Subject | Re: [PATCH v3] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer |
| |
On Tue, Dec 22, 2020 at 01:59:34PM +0000, Michael Kelley wrote: > From: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Sent: Monday, December 7, 2020 8:53 PM > > > > From: Andres Beltran <lkmlabelt@gmail.com> > > > > 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 > > --- > > drivers/hv/channel.c | 9 ++-- > > drivers/hv/hv_fcopy.c | 1 + > > drivers/hv/hv_kvp.c | 1 + > > drivers/hv/hyperv_vmbus.h | 2 +- > > drivers/hv/ring_buffer.c | 82 ++++++++++++++++++++++++++----- > > drivers/net/hyperv/hyperv_net.h | 3 ++ > > drivers/net/hyperv/netvsc.c | 2 + > > drivers/net/hyperv/rndis_filter.c | 2 + > > drivers/scsi/storvsc_drv.c | 10 ++++ > > include/linux/hyperv.h | 48 +++++++++++++++--- > > net/vmw_vsock/hyperv_transport.c | 4 +- > > 11 files changed, 139 insertions(+), 25 deletions(-) > > > > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Applied to hyperv-next.
| |