Re: [PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-04 Thread Michael S. Tsirkin
On Mon, May 04, 2020 at 01:48:34PM +0200, Cornelia Huck wrote: > On Thu, 30 Apr 2020 15:04:42 +0100 > Stefan Hajnoczi wrote: > > > A userspace process holding a file descriptor to a virtio_blk device can > > still invoke block_device_operations after hot unplug. This leads to a > > use-after-fre

Re: [PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-04 Thread Cornelia Huck
On Thu, 30 Apr 2020 15:04:42 +0100 Stefan Hajnoczi wrote: > A userspace process holding a file descriptor to a virtio_blk device can > still invoke block_device_operations after hot unplug. This leads to a > use-after-free accessing vblk->vdev in virtblk_getgeo() when > ioctl(HDIO_GETGEO) is inv

Re: [PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-30 Thread Stefano Garzarella
On Thu, Apr 30, 2020 at 03:04:42PM +0100, Stefan Hajnoczi wrote: > A userspace process holding a file descriptor to a virtio_blk device can > still invoke block_device_operations after hot unplug. This leads to a > use-after-free accessing vblk->vdev in virtblk_getgeo() when > ioctl(HDIO_GETGEO) i

[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-30 Thread Stefan Hajnoczi
A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. This leads to a use-after-free accessing vblk->vdev in virtblk_getgeo() when ioctl(HDIO_GETGEO) is invoked: BUG: unable to handle kernel NULL pointer dereference at 00