Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-30 Thread Wei Liu
On Tue, Jun 30, 2020 at 10:17:36AM +, Wei Liu wrote: [...] > > > > > > If the allocation of the requestor fails during runtime, vmbus_open() > > > fails too and therefore, > > > the channel and the requestor will not be created. So, the 2 functions > > > (next_id, requestor_addr) > > > will ne

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-30 Thread Wei Liu
On Tue, Jun 30, 2020 at 10:09:45AM +, Wei Liu wrote: > On Mon, Jun 29, 2020 at 07:45:00PM -0400, Andres Beltran wrote: > > On Mon, Jun 29, 2020 at 6:20 PM Wei Liu wrote: > > > > > > On Mon, Jun 29, 2020 at 05:51:05PM -0400, Andres Beltran wrote: > > > > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-30 Thread Wei Liu
On Mon, Jun 29, 2020 at 07:45:00PM -0400, Andres Beltran wrote: > On Mon, Jun 29, 2020 at 6:20 PM Wei Liu wrote: > > > > On Mon, Jun 29, 2020 at 05:51:05PM -0400, Andres Beltran wrote: > > > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > > > > > > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, A

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Andres Beltran
On Mon, Jun 29, 2020 at 6:20 PM Wei Liu wrote: > > On Mon, Jun 29, 2020 at 05:51:05PM -0400, Andres Beltran wrote: > > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > > > > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > > > > Currently, VMbus drivers use pointers into gues

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Wei Liu
On Mon, Jun 29, 2020 at 05:51:05PM -0400, Andres Beltran wrote: > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > > > Currently, VMbus drivers use pointers into guest memory as request IDs > > > for interactions with Hyper-V.

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Wei Liu
On Mon, Jun 29, 2020 at 09:56:08PM +, Michael Kelley wrote: > From: Andres Beltran Sent: Monday, June 29, 2020 2:51 PM > > > > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > > > > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > > > > Currently, VMbus drivers use point

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Andres Beltran
On Mon, Jun 29, 2020 at 5:56 PM Michael Kelley wrote: > I'm not understanding the problem here. Any VMbus driver that uses > this requestID allocation mechanism must set newchannel->rqstor_size > to a non-zero value. But if a VMbus driver doesn't use the mechanism, > then newchannel->rqstor_size

RE: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Michael Kelley
From: Andres Beltran Sent: Monday, June 29, 2020 2:51 PM > > On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > > > Currently, VMbus drivers use pointers into guest memory as request IDs > > > for interactions with Hyper-V. To

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Andres Beltran
On Mon, Jun 29, 2020 at 4:46 PM Wei Liu wrote: > > On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > > Currently, VMbus drivers use pointers into guest memory as request IDs > > for interactions with Hyper-V. To be more robust in the face of errors > > or malicious behavior from a

Re: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Wei Liu
On Mon, Jun 29, 2020 at 04:02:25PM -0400, Andres Beltran wrote: > Currently, VMbus drivers use pointers into guest memory as request IDs > for interactions with Hyper-V. To be more robust in the face of errors > or malicious behavior from a compromised Hyper-V, avoid exposing > guest memory address

[PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Andres Beltran
Currently, VMbus drivers use pointers into guest memory as request IDs for interactions with Hyper-V. To be more robust in the face of errors or malicious behavior from a compromised Hyper-V, avoid exposing guest memory addresses to Hyper-V. Also avoid Hyper-V giving back a bad request ID that is t