[BUG] Potential race condition in usbip attach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Sorry if you have received this email twice. My first email contained
html and was not accepted by the mailing list.

I think I have found a race condition which can be triggered for
example when calling two usbip attach commands in parallel on the same
host.

In file linux/tools/usb/usbip/src /usbip_attach.c:
In function static int import_device(int sockfd, struct usbip_usb_device *udev):

At first two processes may call usbip_vhci_driver_open() before
entering the do-while loop.
Next they both call usbip_vhci_get_free_port() and get the same free port.
Finally, they pass the same port number to usbip_vhci_attach_device().

Current recommendation to end users: run usbip attach commands only
sequentially.

Best,
Alexander Timofeev



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux