> -----Original Message-----
> From: Andrea Parri (Microsoft) <parri.and...@gmail.com>
> Sent: Wednesday, September 16, 2020 5:47 AM
> To: linux-kernel@vger.kernel.org
> Cc: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang
> <haiya...@microsoft.com>; Stephen Hemminger
> <sthem...@microsoft.com>; Wei Liu <wei....@kernel.org>; linux-
> hyp...@vger.kernel.org; Andres Beltran <lkmlab...@gmail.com>; Michael
> Kelley <mikel...@microsoft.com>; Saruhan Karademir
> <skar...@microsoft.com>; Juan Vazquez <juv...@microsoft.com>; Andrea
> Parri <parri.and...@gmail.com>; David S. Miller <da...@davemloft.net>;
> Jakub Kicinski <k...@kernel.org>; net...@vger.kernel.org
> Subject: [PATCH v3] hv_netvsc: Add validation for untrusted Hyper-V values
> 
> From: Andres Beltran <lkmlab...@gmail.com>
> 
> For additional robustness in the face of Hyper-V errors or malicious
> behavior, validate all values that originate from packets that Hyper-V
> has sent to the guest in the host-to-guest ring buffer. Ensure that
> invalid values cannot cause indexing off the end of an array, or
> subvert an existing validation via integer overflow. Ensure that
> outgoing packets do not have any leftover guest memory that has not
> been zeroed out.
> 
> Signed-off-by: Andres Beltran <lkmlab...@gmail.com>
> Co-developed-by: Andrea Parri (Microsoft) <parri.and...@gmail.com>
> Signed-off-by: Andrea Parri (Microsoft) <parri.and...@gmail.com>
> Cc: "David S. Miller" <da...@davemloft.net>
> Cc: Jakub Kicinski <k...@kernel.org>
> Cc: net...@vger.kernel.org
> ---
> Changes in v3:
>   - Include header size in the estimate for hv_pkt_datalen (Haiyang)
> Changes in v2:
>   - Replace size check on struct nvsp_message with sub-checks (Haiyang)
> 
>  drivers/net/hyperv/hyperv_net.h   |   4 +
>  drivers/net/hyperv/netvsc.c       | 124 ++++++++++++++++++++++++++----
>  drivers/net/hyperv/netvsc_drv.c   |   7 ++
>  drivers/net/hyperv/rndis_filter.c |  73 ++++++++++++++++--
>  4 files changed, 188 insertions(+), 20 deletions(-)

Reviewed-by: Haiyang Zhang <haiya...@microsoft.com>

Reply via email to