Re: [Fwd: Emulating USB devices from userspace]

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

 




On 12/12/2016 08:18 PM, Fabian Vogt wrote:
> Am Montag, 12. Dezember 2016, 19:47:00 CET schrieb Krzysztof Opasiak:
>>
>> On 12/12/2016 04:40 PM, Fabian Vogt wrote:
>>> Hi,
>>>
>>> (sorry for the missing message ID, I wasn't subscribed to this list
>>> beforehand so I did not get the original message)
>>>
>>> On Fri, Dec 09, 2016 at 12:38:23AM +0100, Andrey Konovalov wrote:
>>>> Hi,
>>>>
>>>> I'm working on a way to extend syzkaller [1] to support fuzzing of the
>>>> USB subsystem. The idea is to be able to emulate various USB devices
>>>> and fuzz communication between the emulated device and the kernel. I'm
>>>> looking for a way to emulate devices from userspace. Similar to how
>>>> tuntap allows to create virtual network interfaces and emit ethernet
>>>> traffic by writing to /dev/net/tun.
>>>
>>> FYI:
>>>
>>> I've started working on a similiar project a week ago, although it's
>>> structured a bit differently. It's made so that a USB gadget device
>>> is used to fuzz arbitrary USB hosts.
>>>
>>> On the one side, it uses the usbredir protocol that is used by
>>> vUSBf (https://github.com/schumilo/vUSBf) and on the other side it
>>> uses usb_gadget configfs (libcomposite) + usb functionfs for the
>>> gadget.
>>>
>>> This means it can also be used to forward a physical USB device over
>>> network to a physical USB host, which makes it useful beyond
>>> fuzzing as well.
>>
>> That's already implemented and called vUDC;)
> 
> Oh well, I completely misunderstood its purpose. I thought it was
> just the implementation detail of using USB/IP devices on the local
> host.

Nope. It's fully working USB Device Controller to which you can bind
your gadget and then connect it to any machine over the network as if it
would be a real USB device;)

> 
> Anyway, it does not talk usbredir and it's not in userspace, so my
> work isn't totally pointless. If you can point me to a translator
> of usbredir to usbip or something equivalent, I can take the next
> week off ;-)

I'm not sure if you need this translator. As vUDC is a device controller
you may use vusbf to generate traffic, pass it to kernel via functionfs
and then vUDC can forward it to you remote host over the network. So why
would you like to do any translation?

Cheers,
-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux