Skip to content
Commit 0ba35fe9 authored by Andrea Parri (Microsoft)'s avatar Andrea Parri (Microsoft) Committed by Jakub Kicinski
Browse files

hv_netvsc: Copy packets sent by Hyper-V out of the receive buffer



Pointers to receive-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, copy (sections of) the incoming packet after validating
their length and offset fields in netvsc_filter_receive().  In this way,
the packet can no longer be modified by the host.

Reported-by: default avatarJuan Vazquez <juvazq@microsoft.com>
Signed-off-by: default avatarAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20210126162907.21056-1-parri.andrea@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 46eb3c10
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment