Emulating USB devices from userspace

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

 



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.

While googling for some information on this I found mentions of
gadgetfs and functionfs. As far as I understand, they allow to turn a
USB host into a gadget and provide a way to communicate with another
host from a userspace application running on the gadget machine.
There's also usbfs, which allows to communicate with a usb gadget
directly from a userspace application.

Am I right, that none of the above actually fit my needs?

Is there some way to emulate USB devices from a userspace application
via some kernel interface?

If not, what would be the easiest way to implement one? I'm thinking
this should be possible by adding some hooks into the kernel, the
question is what to hook and where?

Thanks!

[1] https://github.com/google/syzkaller
--
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