Re: [PATCH 1/1] vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint

2025-01-29 Thread Mike Christie
On 1/29/25 10:36 AM, Stefano Garzarella wrote: >> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c >> index 9a4cbdc607fa..6bb64f3be7db 100644 >> --- a/drivers/vhost/scsi.c >> +++ b/drivers/vhost/scsi.c >> @@ -1828,14 +1828,19 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs, >>     } >>

Re: [PATCH 1/1] vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint

2025-01-29 Thread Stefano Garzarella
On Tue, Jan 21, 2025 at 03:31:25PM -0600, Mike Christie wrote: If vhost_scsi_set_endpoint is called multiple times without a vhost_scsi_clear_endpoint between them, we can hit multiple bugs found by Haoran Zhang: 1. Use-after-free when no tpgs are found: This fixes a use after free that occurs

Re: [PATCH 1/1] vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint

2025-01-28 Thread Stefan Hajnoczi
On Tue, Jan 21, 2025 at 03:31:25PM -0600, Mike Christie wrote: > If vhost_scsi_set_endpoint is called multiple times without a > vhost_scsi_clear_endpoint between them, we can hit multiple bugs > found by Haoran Zhang: > > 1. Use-after-free when no tpgs are found: > > This fixes a use after free

[PATCH 1/1] vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint

2025-01-21 Thread Mike Christie
If vhost_scsi_set_endpoint is called multiple times without a vhost_scsi_clear_endpoint between them, we can hit multiple bugs found by Haoran Zhang: 1. Use-after-free when no tpgs are found: This fixes a use after free that occurs when vhost_scsi_set_endpoint is called more than once and calls a