]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Add (more) validation for untrusted Hyper-V values
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Thu, 14 Jan 2021 20:26:28 +0000 (21:26 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jan 2021 03:47:47 +0000 (19:47 -0800)
commit3a98c7f9731997d4933b86e164faaaf065982962
tree7dd0f2939b234775da7bc5973fc633ba6a6ae757
parente4df315a86fa120701e6d297c4d9e23b7aed1e65
hv_netvsc: Add (more) validation for untrusted Hyper-V values

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.  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.

Reported-by: Juan Vazquez <juvazq@microsoft.com>
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20210114202628.119541-1-parri.andrea@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_bpf.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/hyperv/rndis_filter.c