PCI: hv: Use vmbus_requestor to generate transaction IDs for VMbus hardening
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Tue, 19 Apr 2022 12:23:21 +0000 (14:23 +0200)
committerWei Liu <wei.liu@kernel.org>
Mon, 25 Apr 2022 15:51:12 +0000 (15:51 +0000)
commitde5ddb7d44347ad8b00533c1850a4e2e636a1ce9
treea2bbb72c0967fa69317973c503c379931b8d1ce6
parent82cd4bacff88a11e36f143e2cb950174b09c86c3
PCI: hv: Use vmbus_requestor to generate transaction IDs for VMbus hardening

Currently, pointers to guest memory are passed to Hyper-V as transaction
IDs in hv_pci.  In the face of errors or malicious behavior in Hyper-V,
hv_pci should not expose or trust the transaction IDs returned by
Hyper-V to be valid guest memory addresses.  Instead, use small integers
generated by vmbus_requestor as request (transaction) IDs.

Suggested-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20220419122325.10078-3-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/pci/controller/pci-hyperv.c