I think this should already be possible under linux via udev rules.
It just needs to be wrapped in a convenient tool.
Might be worth it to at least extend the time span that an attacker would need if he had physical access to your laptop/smartphone.
Re:Unpatchable Malware That Infects USBs
by linuxlizard on Friday October 03, 2014 @12:22PM
(#8406174)
I smell a software product opportunity for OSX / Windows.
Black/white list vid/pid (which are easily faked, yes). Closes the door a small amount.
But can also blacklist all HID.