summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>2022-05-12 01:32:06 +0300
committerWei Liu <wei.liu@kernel.org>2022-05-13 19:57:32 +0300
commit9937fa6d1eb6fac95586970e17617a718919c858 (patch)
treeb201384ef57a200585b0fe4c3a8d86020c041909 /drivers/hv
parenta2bad844a67b1c7740bda63e87453baf63c3a7f7 (diff)
downloadlinux-9937fa6d1eb6fac95586970e17617a718919c858.tar.xz
PCI: hv: Add 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 in the host-to-guest ring buffer. Ensure that invalid values cannot cause data being copied out of the bounds of the source buffer in hv_pci_onchannelcallback(). While at it, remove a redundant validation in hv_pci_generic_compl(): hv_pci_onchannelcallback() already ensures that all processed incoming packets are "at least as large as [in fact larger than] a response". Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Link: https://lore.kernel.org/r/20220511223207.3386-2-parri.andrea@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv')
0 files changed, 0 insertions, 0 deletions